This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HttpSessionBinding interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HttpSessionBinding interface" Watch "HttpSessionBinding interface" New topic
Author

HttpSessionBinding interface

saxena Amit
Greenhorn

Joined: Jun 17, 2005
Posts: 5
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.
srinath anand
Ranch Hand

Joined: Nov 20, 2001
Posts: 30
Wouldn't using the HttpSessionListener methods help ?


SCJP2,SCWCD 1.4
Sushma Sharma
Ranch Hand

Joined: Jun 02, 2005
Posts: 139
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpSessionBinding interface