Hi, all,

Whenever I try to use invalidate() to invalidate a session, I got this
error message:
"java.lang.IllegalStateException: Attempt to access an invalidated
session".
Even if I have the invalidate() immediately after a session is created
as below:

HttpSession mySession=request.getSession(true);
mySession.invalidate();

I know that this is not due to the timeout set to be immediate because
if I take "mySession.invalidate()" out of
the code, I keep getting the same session ID, which means the session ID
keeps valid for some time.

Also, when I try to set the timeout using setMaxInactiveInterval() as
below:
mySession.setMaxInactiveInterval(int);
 I got this compiling error message:
"Error: Method setMaxInactiveInterval(int) not found in
javax.servlet.http.HttpSession".

Is there anything wrong with what I do?

Your help is greatly appreciated.

Li

___________________________________________________________________________
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