Mansour wrote:
I am saving objects in the session. After the browser closes I would like to clean the remaining junk. How do I achieve this ?

1. provide a logout action. In this action, get the ServletRequest and invalidate the session immediately; but

2. if the user simply closes the browser, you have no option but to wait for the session to expire. Maybe all you really want is a shorter session timeout.; but

3. If you want a registry of all current sessions on the server so you can invalidate them manually, implement a HttpSessionListener and add this listener to web.xml. It will be notified whenever a session is created or destroyed so you to track the HttpSession objects yourself. Don't do this unless you really need it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to