---
title: "jsp笔记"
author: "letitbe"
date: "2008-08-06T18:10:00Z"
tags: []
slug: "jsp"
draft: false
lastmod: "2008-08-06T18:10:00Z"
id: 238228
url: "https://letitbe.iteye.com/blog/238228"
---

1,  
HttpRequest对象有两种形式的getSession方法调用，一个是getSession()，另一个是getSession(boolean isNew)，前者会检测当前是否有session存在，如果不存在则创建一个，如果存在就返回当前的。getSession()相当于 getSession(false)，getSession(true)则不管当前是否存在Session都创建一个。