You can use the HttpSessionBindingListener interface which has two methods.
The ValueUnBound() is invoked when a session expires, use this method to
redirect your URL to an error page.
Hope it works.
From: Syamakhanth Nandula <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Need help on session timeout
Date: Thu, 6 Jul 2000 14:43:13 -0400
Hi Gurus,
I am developing pages with sessions and need help in this
regard. I need to forward to an error page when the session
times out.
This is the code with in the servlet:
int timeout = 3600; // 30 minutes
HttpSession session = request.getSession(true);
session.setMaxInactiveInterval(timeout);
Please let me know how to forward to an error page when
the session times out.
Thanks in advance.
Regards,
SN
________________________________________________
Get your own "800" number - Free
Free voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
___________________________________________________________________________
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
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
___________________________________________________________________________
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