You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Tamar Furman (tfurman)" <tf...@cisco.com> on 2009/06/28 17:10:55 UTC

Session timeout on shared session between two webapps

Hello,

I have two webapps sharing the same tomcat session. When a session is
created  I set the session timeout dynamically on my session listener
using: session.getSession().setMaxInactiveInterval(). When only the main
webapp is open the timeout works nicely: the session is destroyed on
timeout and the next http request causes a new session to be created
with no user principal which provides me the indication that this is a
new session and allows me to react accordingly. 

The problem starts when the second webapp is opened as well. In this
case, on timeout the session does get destroyed but the new session that
is created on a new http request still holds the old user principal -
meaning I cannot recognize it as a new session.

Does anybody know how can I cause tomcat to clear the user principal
before creating a new session after a timeout?

Thanks,
T.

Re: Session timeout on shared session between two webapps

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tamar,

On 6/28/2009 11:10 AM, Tamar Furman (tfurman) wrote:
> The problem starts when the second webapp is opened as well. In this
> case, on timeout the session does get destroyed but the new session that
> is created on a new http request still holds the old user principal -
> meaning I cannot recognize it as a new session.

What type of authentication are you using?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpI0okACgkQ9CaO5/Lv0PB1aACcDj71lZf0JsMUhUK4pnjFkY9/
vwIAoLVK2/cRgLw1uZwf6iclSd+Zi6JX
=bAAp
-----END PGP SIGNATURE-----

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


Re: Session timeout on shared session between two webapps

Posted by André Warnier <aw...@ice-sa.com>.
Tamar Furman (tfurman) wrote:
> Hello,
> 
> I have two webapps sharing the same tomcat session.
...
> The problem starts when the second webapp is opened as well.
...
Well, I would suggest to just stop sharing the session between your two 
webapps, no ?



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