At 10:29 PM 5/6/2002, Vikramjit Singh wrote:
>you can check with session.isNew() which returns boolean.

JavaDocs don't say anything about isNew() returning 'true' right after a
call to invalidate().   Here's there senario:

1. JSP makes a call to session.invalidate() (in response to a user logging
out of the application)
2. A filter doing generic per-request post-processing housekeeping needs
check if the session is still valid, otherwise a call to putAttribute()
will result in an IllegalStateException.

A work around I've just thought of is to catch the exception and simply
fall through if it's thrown.  Is this the best I can do?

Dmitry

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to