This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You can use class which act as session listener in your application and register it in deployment descriptor (web.xml) . It extends HttpSessionListener and implements method sessionCreated(HttpSessionEvent se) and sessionDestroyed(HttpSessionEvent se). You can put your code for clean up in method sessionDestroyed(). The web container will invoke or notify sessionDestroyed() when your application invalidates sessions or the sessions are timeout. Hope this help... Correct me if i am wrong... daniel [ April 02, 2003: Message edited by: Fisher Daniel ]
If you make your class that contains the data a SessionBindingListener, the object will be notified when the session is destroyed and you will have the data right there. You don't have to register a SessionBindingListener. Bill