Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Session time out related question

Urvish Shah

2007-07-17

Replies:

Hi



In our application we are using Tomcat 5.5.9. Our tomcat session time
out is 30 minutes



We have one bottom html frame in our web page which automatically gets
refreshed every 10 seconds to poll some event notifications after user
logs in.

Because of this reason we never get session time out and user gets
logged in always. Only way we can make session time out work (and send
the user back to login page to login again) if we either increase our
page refresh interval (5 seconds to 5 minutes) or decrease the session
time out (default 30 minutes to 5 minutes) and both is not acceptable in
our design or in general web based design.





Basically we want to have the Tomcat session time out based on user's
last access of any web page (after he logs in).



Is there any settings provided by Tomcat to handle this situation or we
need to write our custom code to such as

If (current time - user's last access time) > session timeout

then redirect the user to login page



I would prefer if Tomcat has a smarter way to deal with this without us
writing our own custom code to deal with this situation



Any help on this topic is appreciated



Best regards,

Urvish





©2008 junlu.com - Jax Systems, LLC, U.S.A.