in javadocs u wont find many things which work like
session.setMaxInactiveInterval(time), so is the same with session.isNew()
and if it returns true that means that either the user is just logged in or
his session is logged of.

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


-----Original Message-----
From: Dmitry Beransky [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 10:51 PM
To: [EMAIL PROTECTED]
Subject: Re: determining invalidated session


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

===========================================================================
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