On Fri, 16 Aug 2002, Mike Silvers wrote:

> How do I determine if a HttpSession is invalid (not using the
> HttpSessionContext since that has been deprecated)?  I am checking
> to see if the session is null or if the session ID is null and that
> does not work.
>
> What I am trying to accomplish is to check the HttpSession object to
> see if it is invalid.  If it is invalid, I create a new HttpSession
> object with some initialization parameters and use the new
> HttpSession object.

Isn't this what HttpServletRequest.getSession() is for?  See:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/servletapi/javax/servlet/http/HttpServletRequest.html#getSession(boolean)

Note the role the parameter plays, and the existence of the no
parameter version.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to