You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Merwin Yap <me...@webphilippines.com.ph> on 2001/02/03 09:27:52 UTC
[Fwd: Session expiration...]
Re: [Fwd: Session expiration...]
Posted by "John Clark L. Naldoza" <nj...@ntsp.nec.co.jp>.
Merwin Yap wrote:
>
> ------------------------------------------------------------------------
>
> Subject: Session expiration...
> Date: Sat, 03 Feb 2001 16:18:38 +0800
> From: Merwin Yap <me...@webphilippines.com.ph>
> To: wm@codemedia.com
>
> Hi! I want to ask about sessions in tomcat. How do you change the
> elapsed time for the session to expire.
>
> Thanks!
>
> Merwin
>
There are two ways that I know of, runtime and init time.
During runtime you can change the session "timeout" by getting a session
object from you request and using the setMaxInactiveInterval() method
with the proper parameters.
Check the HttpSession Interface under the javax.servlet.http package.
During Init time or initialization, it's just a couple of XML statements
in your web.xml I believe you can find the definitions under the web.dtd
file...
Hope that helps.
Cheers,
John Clark
--
/) John Clark Naldoza y Lopez (\
/ ) Software Design Engineer II ( \
_( (_ _ Web-Application Development _) )_
(((\ \> /_> Cable Modem Network Management System <_\ </ /)))
(\\\\ \_/ / NEC Telecom Software Phils., Inc. \ \_/ ////)
\ / \ /
\ _/ phone: (+63 32) 233-9142 loc. 3112 \_ /
/ / cellphone: (+63 919) 241-4612 \ \
/ / email: njclark@ntsp.nec.co.jp \ \
Re: [Fwd: Session expiration...]
Posted by Doug Ferguson <df...@coremetrics.com>.
I'd like to know too!!!
Merwin Yap wrote:
> ------------------------------------------------------------------------
>
> Subject: Session expiration...
> Date: Sat, 03 Feb 2001 16:18:38 +0800
> From: Merwin Yap <me...@webphilippines.com.ph>
> To: wm@codemedia.com
>
> Hi! I want to ask about sessions in tomcat. How do you change the
> elapsed time for the session to expire.
>
> Thanks!
>
> Merwin
>
> ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
Re: [Fwd: Session expiration...]
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Kief Morris wrote:
> Merwin Yap typed the following on 04:27 PM 2/3/2001 +0800
> >Hi! I want to ask about sessions in tomcat. How do you change the
> >elapsed time for the session to expire.
>
> In your web.xml put:
>
> <session-config>
> <session-timeout>30</session-timeout>
> </session-config>
>
> Change 30 to the number of minutes that must elapse before the
> server will expire an inactive session.
>
This sets the global default for new sessions created within this webapp.
You can also call session.setMaxInactiveInterval() to change the timeout
for a particular session, at any time. Note that the value here is in
seconds, rather than minutes.
>
> Kief
>
Craig McClanahan
Re: [Fwd: Session expiration...]
Posted by Kief Morris <ki...@bitbull.com>.
Merwin Yap typed the following on 04:27 PM 2/3/2001 +0800
>Hi! I want to ask about sessions in tomcat. How do you change the
>elapsed time for the session to expire.
In your web.xml put:
<session-config>
<session-timeout>30</session-timeout>
</session-config>
Change 30 to the number of minutes that must elapse before the
server will expire an inactive session.
Kief