You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2004/05/02 06:10:37 UTC
Re: Newbie: Session timeout strategy; opinions?
Freddy Villalba Arias wrote:
>I believe Tomcat does provide that... not sure since when (which
>version), though.
>
Terminating sessions via the invalidate() method is common to all
servlet containers. So is the fact that you can set the default session
timeout to 0 or less in web.xml to turn off timeouts (by default, at least).
Finally, there is another less-commonly known feature of session
timeouts -- you can vary the timeout for each request individually, by
calling HttpSession.setMaxInactiveInterval(). If you have points in
your application where you really do want to enforce a different timeout
within the same session, it is straightforward to do so.
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org