wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes session timeout in DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "session timeout in DD" Watch "session timeout in DD" New topic
Author

session timeout in DD

janne s
Ranch Hand

Joined: Sep 21, 2004
Posts: 81
Hi!

can anyone help me with this...
I've a doubt in configuring session timeout in DD.
What happens if i set as follows..

<session-config>
<session-timeout>0</session-timeout>
</session-config>

<session-config>
<session-timeout> -1 </session-timeout>
</session-config


thank you in advace...
jaya
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
We cannot have multiple session-config elements in the web.xml.

To clarify the difference between 0 and -1 values for sesion-timeouts in web.xml, here is an extract from the specs.

Servlet 2.4 specs, p:141

12. session-config Element

The session-config defines the session parameters for this Web application. The sub-element session-timeout defines the default session timeout interval for all sessions created in this Web application. The specified timeout must be expressed in a whole number of minutes. If the timeout is 0 or less, the container ensures the default behaviour of sessions is never to time out. If this element is not specified, the container must set its default timeout period.


Either zero or negative, the behaviour of the session-timeout is expected to the same. i.e) The sessions never expire!
janne s
Ranch Hand

Joined: Sep 21, 2004
Posts: 81
Thanks for the reply vishwa
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session timeout in DD
 
Similar Threads
need help with session time our
session doubt
Tomcat manager "Expire sessions" button
Interview question asked to me which I could not answer
Increase Session expiry limit