>HttpSession session = event.getSession();

works fine. But using the session.getAttribute throws the exception...


First a call:

                session.setAttribute("toto", new MyHttpSessionBindingListener());// so 
it
will be called when the session dies... (i don't remove it explicitly
elsewhere)


with:


class MyHttpSessionBindingListener implements HttpSessionBindingListener {

public void valueUnbound(HttpSessionBindingEvent hse) {
                HttpSession session = hse.getSession();
                System.out.println("valueUnbound");

                Object o = session.getAttribute("Caddy"); // a session.getAttribute 
throws
an exception here: Session already invalidated
                // cleanup here...
        }

public void valueBound(HttpSessionBindingEvent hse) {
        }

}


<listener>
        <listener-class>MyHttpSessionBindingListener</listener-class>
</listener>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to