Session - setMaxInactiveInterval
Posted on 2005-04-21
Sorry to keep asking but this week, I am a kind of "stupid" hehe :).
Now, I have disabled my users to multiple login in my J2EE Web Application. I am using timestamp to check whether he or she has logged-in to my system. Well, everything runs ok until I found one bug :(.
First, I have set my session to be invalidated within 10 mins if there is no interaction of the client. A kind of automatic invalidation. I used setMaxInactiveInterval(600) to do this. Now, after 10 mins, the session is invalidated but how can I detect it and remove the timestamp of my database?
In conclusion, how can I detect that the session has reached its MaxInactiveInterval and I can remove the timestamp?
Thanx and Regards