aspose file tools*
The moose likes Servlets and the fly likes redirecting a request with HttpSessionBindingListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "redirecting a request with HttpSessionBindingListener" Watch "redirecting a request with HttpSessionBindingListener" New topic
Author

redirecting a request with HttpSessionBindingListener

Tony May
Greenhorn

Joined: Jan 04, 2002
Posts: 17
Dear All,
Is it possible to recreate a new session object as soon as a timeout has occured on the original. I presume I would need to put an object in the orginal session that implements the HttpSessionBindingListener and recreate it in the valueUnbound(). Alterantively, is it possible to redirect a request object once the valueUnBound() has been called on an object
Any help would be appreciated
regards
Tony
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
When your HttpSessionBindingListener gets called due to a timeout and the session being destroyed, there is in fact NO request on-going so you can't create a new session.
What you could do would be to move the data to some other form of storage such as a serialized file or database entry for that particular user.
Important Note: When the session is being destroyed, the only data you can reliably recover is that contained in the object that implements the HttpSessionBindingListener interface. Other items may have already been unbound.
Bill
 
jQuery in Action, 2nd edition
 
subject: redirecting a request with HttpSessionBindingListener