struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Ogateter" <hinb...@yahoo.ca>
Subject Struts and session
Date Tue, 17 Dec 2002 05:32:39 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message