Howdy, By the time sessionDestroyed is call, the session has been invalidated. That doesn't mean you can't get information about it: only certain information ;) HttpSession#getAttribute is clearly documented to throw an IllegalStateException if called on an invalidated session.
If you're interested in attributes, implement an HttpSessionAttribute or Binding listener. In it, you will be notified when an attribute is removed and you will be able to access its value. Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Lukas Bradley [mailto:[EMAIL PROTECTED] >Sent: Wednesday, November 26, 2003 1:07 PM >To: [EMAIL PROTECTED] >Subject: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in >general) > >All, > >When I attempt to access the HttpSession object within the >sessionDestroyed(), I get the following error. > >DEBUG [StandardManager[]] (SessionListener.java:40) - sessionDestroyed() >StandardManager[] Session event listener threw exception >java.lang.IllegalStateException: getAttribute: Session already invalidated > at >org.apache.catalina.session.StandardSession.getAttribute(StandardSessio n.ja >v >a:954) > at >org.apache.catalina.session.StandardSessionFacade.getAttribute(Standard Sess >i >onFacade.java:171) > at >dollars.ui.actions.DollarsAction.getUserVO(DollarsAction.java:46) > at >dollars.ui.controllers.SessionListener.sessionDestroyed(SessionListener .jav >a >:42) > at >org.apache.catalina.session.StandardSession.expire(StandardSession.java :659 >) > at >org.apache.catalina.session.StandardSession.expire(StandardSession.java :608 >) > at >org.apache.catalina.session.StandardManager.processExpires(StandardMana ger. >j >ava:793) > at >org.apache.catalina.session.StandardManager.run(StandardManager.java:87 0) > at java.lang.Thread.run(Thread.java:536) > >Why would the HttpSessionEvent *seem* like it should have access to the >session that has just been removed, yet not be able to access it? Is this >a >Tomcat problem, or does the Servlet 2.3 spec simply want you to know that >some random session was just invalidated, but you can't get any information >about it. > >Any help appreciated. > >Lukas > > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]