Doug, the servlet container is responsible for invalidating the session based on the configured timeout. If you want to take some action when that occurs you should register an HttpSessionListener to receive notification of session lifecycle events. For complete details you can read the Servlet spec and/or the Servlet 2.3 Javadocs.
-----Original Message----- From: Doug Ogateter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 12:33 AM To: Struts Users Mailing List Subject: Struts and session Greetings: I am using struts1.1b2 to implement a web application. I have a question regarding to implementing session timeout. When session is invalidated, user who has logged in the system should be forwarded to login page. I am not clear about the followings, and hope someone can help me out. 1. Who will invalidate the session when timeout? Servlet container will do it automatically? 2. Should I use request.getSession(false) to check if session is timeout? If so, that means for every request, it will check if session is invaildate. Will it cause performance problem? If not, which methods should I call to check it? 3. If I should use request.getSession(false) to check session timeout, where should I write the code? Should I write the code in every action class? 4. There are many methods related to session, such as getCreationTime, getLastAccessedTime,..Where and how should I use them in the implementation? 5.From my understanding, I can set timeout in web.xml or use setMaxInactiveIterval(int ..). Usually which way should be use? 6. After user login, I want to forward the user to the page where he was when session timeout. Where should I save the information(with the information, I know where I should forward the user to)? I searched the archive. However, it seems that I can't find the specific info. Your help is highly appreicated. Doug -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>