Discussion:
Tomcat's session and memory management
Cameron
2006-07-06 07:09:12 UTC
Permalink
Hello

Would anyone know how to adjust the length of time/period tomcat's
session is active? Is there a way to force session to clear when
someone closes their browser?

Another question is how does one increase the memory available for
tomcat (V4.1.31) in a windows environment running as a service.

Thank you.


---------------------------------------------------------------------
To start a new topic, e-mail: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Harshal Joshi
2006-07-06 09:45:42 UTC
Permalink
Hi,

In web.xml you can define session time. Like,

<session-config>
<session-timeout>30</session-timeout>
</session-config>
here 30 is in minutes...

when you close window at that time just write
session.invalidate();


-----Original Message-----
From: news [mailto:***@sea.gmane.org]On Behalf Of Cameron
Sent: Thursday, July 06, 2006 12:39 PM
To: ***@tomcat.apache.org
Subject: Tomcat's session and memory management


Hello

Would anyone know how to adjust the length of time/period tomcat's
session is active? Is there a way to force session to clear when
someone closes their browser?

Another question is how does one increase the memory available for
tomcat (V4.1.31) in a windows environment running as a service.

Thank you.


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


---------------------------------------------------------------------
To start a new topic, e-mail: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Peter Crowther
2006-07-06 09:41:58 UTC
Permalink
From: Cameron
Would anyone know how to adjust the length of time/period tomcat's
session is active?
http://www.jguru.com/faq/view.jsp?EID=415341
Is there a way to force session to clear when
someone closes their browser?
No, as you cannot know reliably that the browser has been closed due to
features of HTTP. An oft-repeated recommendation is to use a frame or
IFRAME in your application with a rapid META REFRESH (say once every
couple of minutes). If you don't see these refreshes for a few minutes,
you can time out the session.

- Peter

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

Loading...