On Wed, 14 Nov 2001, Moós Gábor wrote:

> I'm using tomcat 4.0, and have written a HttpSessionListener servlet.
> Everything is smooth as long as the sessionCreated event is handled,
> but the sessionDestroyed event never happens... Or so it seems.
> The default session-timeout is defined in the web.xml, and is set to 30
> seconds.
> The servlet writes "debug" information into the window of tomcat (using
> System.out), and it works for the sessionCreated event, but does not
> seem to do anything for the sessionDestroyed event.

> Is this a known bug, (conclusion drawn from the quick release of tomcat 4.0.1 after 
>4.0) or am I missing something somewhere?
I'm pretty sure that writing to System.out isn't a supported feature - I
would personally suggest using a sessionDestroyed method like this:

public  void    sessionDestroyed(HttpSessionEvent se) {
        HttpSession     session         = se.getSession ();
        ServletContext  context         = session.getServletContext ();

        context.log ("Session destroyed");
}

___________________________________________________________________________
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