Look for a query string variable that indicates that the user thinks he should have a session. Then if you can't find the session, assume it's because he timed out, and generate the "timed out" page.
Duane Morse Eldorado Computing, Inc., Phoenix, Arizona -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED] On Behalf Of Ming Sent: Thursday, December 09, 2004 2:53 PM To: [EMAIL PROTECTED] Subject: session timeout I have a Web site which has some contents require user login to access. I'd like to redirect the user to a page displaying "session timed out" message when the user's login session expired and redirect the user to the login page when a user tries to access secured content (let's say he booked mark a URL of secured content when he logged in last time) before login. I tryed to do this by creating an object, putting it in a user's session when the user has been authenticated and checking the object's existance in a filter. But this doesn't work, as in either case the object doesn't exist - either the object has not been created since the user has not logged in, or, the session timed out and the object is unbound from the session. Any suggestions? Thanks. ________________________________________________________________________ ___ 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 -- CONFIDENTIALITY NOTICE -- This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you. ___________________________________________________________________________ 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