-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 7/8/2011 3:20 PM, Caldarale, Charles R wrote:
>> From: Sai Pullabhotla [mailto:sai.pullabho...@jmethods.com] 
>> 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.

+1

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
interval.

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4XY18ACgkQ9CaO5/Lv0PBrswCfZXb1Ym5s8S/+otMtDwhHe8O+
1C4AoK+WAh4YQ/RNEr0Bk2a9m72XtRxs
=Du3g
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to