This comes up
alot so you might try a search for more information.
Basicallly, the
servlet engine will invalidate the session after a certain period of inactivity. The default value is 30 minutes but you can change that in web.xml:
You can also change the timeout in a specific session object.
Since HTML does not maintain a connection, there is no way built in to servlets of knowing if the client is still "at" your site. There are various tricks, but they involve processes that run on the client browser.
You can use one of the "Listener" interfaces to be notified when a session is invalidated.
Bill