• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

HttpSessionBinding interface

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on struts and ejb.
Is there a way to get a session's attribute after session timeout.I used

HttpSessionBinding interface.
public void valueUnbound(HttpSessionBindingEvent event) {
log.debug("User is UnBound as "+event.getSession().getId());

I am able to get the sessionId.
But it is not able to get attribute as tomcat already run removeAttribute().Server prompts error at this point.
How should I get attribute in valueUnbound(..)if session is timed out.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't using the HttpSessionListener methods help ?
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I think srinath is correct. What you can do is implement HttpSessionListener and in the sessionDestroyed() method, you can save the attribute for further use...
 
reply
    Bookmark Topic Watch Topic
  • New Topic