I'm looking at the 2.3 spec right now. SRV 7.5 does say that the timeout
set by setMaxInactiveInterval() is for inactivity. However, that section
doesn't address the <session-timeout/> parameter. It does say that the
default is up to the container.

In SRV.13.3, the <session-timeout/> defines the default timeout.
However,
the word "inactivity" is interestingly missing from this description. It
also specifies the ability to set the system to never timeout if the
value is set to 0 or less.

None of this explains why my session timed out after ~30 minutes of
continuous activity by default or with the <session-timeout/> parameter
set to 5 minutes.

I must really be missing something. Everything everybody has said is
reasonable and matches my expectations. However, it does not appear to
match my experiments.

I'll try some more.

Thanks,
G. Wade

"Shapira, Yoav" wrote:
> 
> Howdy,
> The servlet specification is the only authority on this, misleading
> books should be tossed aside.  SRV.7.5 is clear, session timeout is for
> inactivity, not total duration, as Senor Curwen opined.
> 
> The first part of his message, using $CATALINA_HOME/conf/web.xml, I
> would discourage, as it's non-standard.  Stick to WEB-INF/web.xml, which
> is standard and therefore portable across containers.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> >-----Original Message-----
> >From: Mike Curwen [mailto:[EMAIL PROTECTED]
> >Sent: Friday, September 05, 2003 10:05 AM
> >To: 'Tomcat Users List'
> >Subject: RE: Session Timeout
> >
> >anything you set in WEB-INF/web.xml can be set in
> >CATALINA_HOME/conf/web.xml and these setting will be used on a global
> >basis, unless overriden at a lower level.
> >
> >FWIW, I've always understood session-timeout to mean "after a period of
> >inactivity".  I mean really... how useful would sessions be if they
> >logged you out after n minutes, no matter your activity level?  Talk
> >about frustrating! "It doesn't matter that you've been using my site
> >continuosly for the past 30 minutes, I'm still kicking you off". That
> >sounds like 'session-duration' to me.
> >
> >
> >
> >> -----Original Message-----
> >> From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
> >> Sent: Friday, September 05, 2003 8:45 AM
> >> To: Tomcat Users List
> >> Subject: Re: Session Timeout
> >>
> >>
> >> I'm using Tomcat 4.1.18 & 4.1.24 (two different machines).
> >> The behavior is the same on both. As I said in my other
> >> message, I was basing my questions on the documentation I had
> >> read. Your response made me do a little testing. Now, I'm
> >> even more confused.
> >>
> >> My assumption was based on information in "Professional Java
> >> Servlets 2.3" by Wrox. In chapter 5, they explicitly state
> >> that the <session-timeout/> value applies to lifetime, not
> >> inactivity, (p. 240).
> >>
> >> I also checked with
> >> http://developer.java.sun.com/developer/Books/javaserverpages/
> >> servlets_javaserver/servlets_javaserver05.pdf
> >>
> >> Section 5.10 describes that parameter as well. It does seem
> >> to imply that we are talking about inactivity timeouts, but
> >> the text is not actually explicit. It could be read either way.
> >>
> >> For my test, I set the <session-timeout/> to 5 minutes. If
> >> this was a lifetime thing, my session should expire pretty
> >> quickly. If not, it would last forever. (My servlet is being
> >> queried by an applet on a regular basis.)
> >>
> >> The session did not expire after 5 minutes. It expired after
> >> 30 minutes, just like it did before I added the <session-timeout/>.
> >>
> >> Any help would be appreciated.
> >> G. Wade
> >>
> >> PS. Since the <session-timeout/> is located in web.xml, I
> >> assume it is webapp-specific. Is there any way to set up a
> >> timeout on multiple webapps? (Short of making a change for
> >> each webapp.) I'm currently using single-sign-on to bring a
> >> couple of webapps together into one app from the user's point of
> view.
> >>
> >>
> >>
> >> Filip Hanik wrote:
> >> >
> >> > >I just found out that sessions on my webapp are
> >> automatically being
> >> > >logged out after some period of time. Even when they are
> >> being used.
> >> >
> >> > this should not be the case <session-timeout> should be the
> >> inactivity
> >> > timeout what version of tomcat?
> >> > Filip
> >> >
> >> > ----- Original Message -----
> >> > From: "G. Wade Johnson" <[EMAIL PROTECTED]>
> >> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >> > Sent: Thursday, September 04, 2003 2:36 PM
> >> > Subject: Session Timeout
> >> >
> >> > I've just been surprised by something that I thought I understood.
> >> >
> >> > I just found out that sessions on my webapp are automatically being
> >> > logged out after some period of time. Even when they are being
> used.
> >> >
> >> > >From reading the docs, it appears that the normal timeout
> >> behavior is
> >> > to terminate any session that has lived longer than n
> >> minutes. Is this
> >> > correct?
> >> >
> >> > Also there appears to be a <session-timeout/> element that
> >> allows you
> >> > to set the length of this timeout.
> >> >
> >> > However, if I am reading the documentation correctly, the
> >> only way to
> >> > set an "inactivity timeout" is programmatically? (I
> >> actually thought
> >> > the "session-timeout" was an "inactivity timeout".<shrug/>)
> >> >
> >> > How is the best way to go about adding this feature? Is the
> >> > HttpSessionListener interface the best way to go?
> >> >
> >> > Thanks,
> >> > G. Wade
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> >---------------------------------------------------------------------
> >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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to