Originally posted by Ramdhan Kotamaraja:
sessionDestroyed() is called before invalidating the session.
wrox says you can save the data to database or any other cleanups before the session is being invalidated in sessionDestroyed() method.
Some of the use is on the server, which can pool Servlets, and also Sessions.
Originally posted by jyothi ve:
I hope the use of HttpSessionListener class is to initilize or track information before serving the requests.
For example: For Admin purpose to findout number of active sessions in the given point of time, how many users accessed the site etc.
when session destroy called number of active users will get reduced.
If you want to initialize some session specific information you can do in this method