getSession(true)和getSession(),有什么区别
2009-04-27 15:14
357 查看
public HttpSession getSession(boolean create)
Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session.
If create is false and the request has no valid HttpSession, this method returns null.
Parameters:
true - to create a new session for this request if necessary; false to return null if there's no current session
Returns:
the HttpSession associated with this request or null if create is false and the request has no valid session
帮助上是这么说的,
但实际用起来好像 getSession(true)有时会自动创建一个新的session,而把原来的session替换掉
Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session.
If create is false and the request has no valid HttpSession, this method returns null.
Parameters:
true - to create a new session for this request if necessary; false to return null if there's no current session
Returns:
the HttpSession associated with this request or null if create is false and the request has no valid session
帮助上是这么说的,
但实际用起来好像 getSession(true)有时会自动创建一个新的session,而把原来的session替换掉
相关文章推荐
- getSession(true)和getSession(),有什么区别
- request.getSession(false),request.getSession()和request.getSession(true)的区别
- getSession() , getSession(false) ,getSession(true) 区别
- getSession()与getSession(true)区别
- getSession(true)和getSession(false)的区别
- request.getsession(true)和request.getsession(false)的区别
- request.getSession(true) request.getSession(false) request.getSession()
- request.getSession(true)和request.getSession(false)的区别
- request.getSession(true)和request.getSession(false)的区别
- SSH的项目中,使用getHibernateTemplate 与 getSession有什么的区别?优点与缺点是什么
- getSession(true)和getSession(false)的区别介绍
- request.getSession(false)&request.getSession(true)的区别
- Hibernate中的openSession(),getSession() 和 getCurrentSession() 的区别
- request.getParameter("uname")和session.getAttribute("uname")有什么区别
- request.getSession() 与 request.getSession(true/false)有何区别?
- 关于request.getSession(true/false/null)的区别
- request.getSession(true)和request.getSession(false)的区别
- 转:request.getSession(true)和request.getSession(false)的区别
- request.getSession(false)与request.getSession(true)的区别
- request.getSession(true)和request.getSession(false)的区别