my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Session Timeout parameter. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Session Timeout parameter." Watch "Session Timeout parameter." New topic

Session Timeout parameter.

Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Hi All,

As we know there are three simple ways to set timeout.


2)WEB.XML(tomcat's in conf folder).

Format :

3)Is in Particular session Object


I am confused which one will take more precedence at the time when application run,if i set timeout for a session in

Application web.xml to 30 Min
and tomcat web.xml to 60 min

and in session Object to 10 min.

After how much time session will get timeout


SCJP6.0,My blog Ranchers from Delhi
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1076

Any session timeout set in Server's web.xml is overriden by timeout set in Application's web.xml.
And session timeout set in Application's web.xml is overridden by timeout set in Servlet code.

So, session timeout shall be 10 minutes

Happy learning

~ abhay
It is sorta covered in the JavaRanch Style Guide.
subject: Session Timeout parameter.
Similar Threads
Session timeout in struts
Session timeout not working
Session-timeout problem on Oracle application server
session timeout
Setting session timeout dynamically in Java code