File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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