aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Session Timeout parameter." Watch "Session Timeout parameter." New topic
Author

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.

1)WEB.XML(Application's).

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

Format :
<session-config>
<session-timeout>3</session-timeout>
</session-config>

3)Is in Particular session Object

request.getSession().setMaxInactiveInterval(60*10);


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

Thanks
Shanky


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

Joined: Feb 29, 2008
Posts: 1162
    
    1

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session Timeout parameter.