You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tina G <ti...@gmail.com> on 2007/10/15 08:43:18 UTC
Problem in request.getSession(false); in Tomcat 5.5.14
Settings/Configuration:
Tomcat/conf/web.xml has session-timeout set to 30 minutes
Application's WEB_INF has web.xml with session-timeout set to 2 minutes
Java Class1
On first form submit to the server, create an httpsession using
request.getSession(true). SessionId is assigned. Set maxinactive interval to
120 seconds for the current session.
Java Class2 extends Action implements HttpSessionListener
Provides implementation for sessiondestroyed method in HttpSessionListener.
Session timeout after 2 minutes by tomcat container but on submiting a
second form to the server;
request.getSession(false);
is not returning NULL. Instead a new SessionId gets assigned.
Inputs on this strange behaviour of Tomcat 5.5.14 appreciated.
Re: Problem in request.getSession(false); in Tomcat 5.5.14
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tina,
Tina G wrote:
> Session timeout after 2 minutes by tomcat container but on submiting a
> second form to the server;
> request.getSession(false);
> is not returning NULL. Instead a new SessionId gets assigned.
Something else must be happening before this call to create a new
session. Are you hitting anything else at all before you try to submit
this form?
You said "extends Action"... are you using struts?
You might want to see what Struts is doing before your request gets to
the HttpSessionListener (do you have "locale" set on your controller?).
You might even want to create a new HttpSessionListener that dumps a
stack whenever a session is created, and you can see where it is happening.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHE2449CaO5/Lv0PARAjg4AKCCwSKvGSwC+p0eyBT5LdSEss0KSACgis+N
oSck6IsvaMYB3VhKU8e87RQ=
=wPgj
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
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