tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Uploading large files and session timeout
Date Fri, 08 Jul 2011 20:06:55 GMT
Hash: SHA1


On 7/8/2011 3:20 PM, Caldarale, Charles R wrote:
>> From: Sai Pullabhotla [] 
>> Subject: Re: Uploading large files and session timeout
>> As far as I know, the session's lastAccessTime gets updated on
>> each request from the client (by the container), and there is no
>> public API to update the last access time.
> Your servlet could call HttpSession.setMaxInactiveInterval() as 
> needed to prevent a timeout.


Our webapp uses this technique when we hand-off the user from our
primary webapp to a secondary one, and then get them back after some

Sometimes, the interaction with that second webapp can last longer than
the session timeout in the primary (30 minutes) and we don't want users
to have to log back in.

So, just before we hand-off the user to the secondary webapp, we change
the session timeout to a higher value, and then re-set it to the lower
value when they come back.

The OP could adopt this technique when uploading files. One could even
look at the Content-Length and make a judgement call about whether the
timeout needs to be adjusted at all (maybe above 5MiB requires a
session-timeout adjustment, but others do not).

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message