Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

redirecting a request with HttpSessionBindingListener

 
Tony May
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic