tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Basham <bbas...@stillsecure.com>
Subject Re: Session timeout during method execution
Date Wed, 31 Jan 2007 15:55:20 GMT
Did you know that you have programmatic control over the
session timeout.  Simply call the setMaxInactiveInterval method
on the HttpSession object with a value in seconds.  So if you
know that a given request will take 10 minutes you can say:
session.setMaxInactiveInterval(600); at the beginning of the
request.

Caveats:  You will need to reset the inactive interval back to
five minutes when the request has completed processing or
this value will be used for the rest of that user's session.  BTW,
this method only alters the inactive interval *for this user*.

Second caveat: Have you verified that the browser or server
will not "timeout" during this long request cycle?

HTH,
Bryan


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message