dear elisabeth,
I understood ur problem like this,
When the user exits the application, i.e when he logs out of the application, u want the session to be invalidated right?..
If that is the case, you call session.invalidate(). against the logout click.
Or if you want the session to be invalidated and fresh login to be popped up, when the user exits out of the application without a logout request, i.e if he closes the browser and reopens it, better use a client side script to call a jsp/servlet to invalidate the session. There are certain event handlers that can be invoked before closing thewindow. events like onUnload(), onClose() will work out. Try for the syntax of these events... sorry for not providing the syntax..
regards
Rammohan
J2EE Programmer.
|