Ram Dhan Yadav (SCJP, SCWCD, SCJA-I, IBM EC(483))
"We are what we repeatedly do. Excellence, then, is not an act, but a habit."
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.
Jyothi<br /> <br />Sun Certified Business Component Developer<br />Sun Certified Web Component Developer<br />Sun Certified Java Programmer<br />Oracle Certified SQL & PL-SQL Programmer
Some of the use is on the server, which can pool Servlets, and also Sessions.
Jyothi<br /> <br />Sun Certified Business Component Developer<br />Sun Certified Web Component Developer<br />Sun Certified Java Programmer<br />Oracle Certified SQL & PL-SQL Programmer
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
Jyothi<br /> <br />Sun Certified Business Component Developer<br />Sun Certified Web Component Developer<br />Sun Certified Java Programmer<br />Oracle Certified SQL & PL-SQL Programmer
SCJP 1.4
-------------<br />SCJP 1.4 <br />SCWCD (just started)
Poop goes in a willow feeder. Wipe with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|