tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike McGuinness <mmcgu...@lssi.net>
Subject Re: session.getMaxInactiveInterval()
Date Wed, 22 May 2002 15:36:49 GMT
Chris,

Simple question, are you sure you're using a servlet 2.3 compliant
implementation?

Mike

 On Tue, 2002-05-21 at 11:00, Chris Wilson wrote:

    Hello,
    
    I'm calling session.getMaxInactiveInterval() on a session after it has
    been invalidated.
    
    Tomcat is throwing an IllegalStateException and saying that method
    cannot be called on an invalid session.  However, the Servlet 2.3 API
    docs do not state that IllegalStateException should be thrown (as it is
    with many other methods in HttpSession) from getMaxInactiveInterval().
    
    The reason I've run into this problem is because I'm trying to write a
    HttpSessionAttributeListener that determines if the session is being
    explicitly invalidated or if it timed out.
    
    The Servlet 2.3 spec (section 10.7) states,
    
    "It is often useful in tracking sessions to know whether a session
    became invalid because the container timed out the session, or because a
    web component within the application called the invalidate method. The
    destinction may be determined indirectly using listeners and the
    HTTPSession API methods."
    
    If I can't call getMaxInactiveInterval() on an invalidated session, how
    can I determine if the session was invalidated due to time out?  Is this
    a bug in Tomcat?  It seems so since it doesn't follow the API docs for
    this call.
    
    Thanks in advance for any insight.
    
    Chris Wilson
    
    Web Developer
    Andrews University
    cwilson@andrews.edu 
    
    
    --
    To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
    For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
    

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message