aspose file tools*
The moose likes Servlets and the fly likes Session timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session timeout" Watch "Session timeout" New topic
Author

Session timeout

Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
If i've defined session timeout parameters at three different places:

1. In web.xml file
2. In the application - through HttpSession.setMaxInactiveInternal...
3. In the Web Server console (if the web server supports)

Which one of the above three will take precedence?
prash patil
Ranch Hand

Joined: May 26, 2008
Posts: 40
Hi Ankit,
Please find the link..if it can satisfy your question.
HTTP Session time-out Override Precedence Summary
Baseet Ahmed
Ranch Hand

Joined: Dec 18, 2006
Posts: 224
Patil,

Nice info.

Will it be applicable for all other servers also(Weblogic,Jboss etc).

Regrds
Baseet Ahmed
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Originally posted by Baseet Ahmed:
Patil,

Nice info.

Will it be applicable for all other servers also(Weblogic,Jboss etc).

Regrds
Baseet Ahmed


web.xml is a J2EE spec and it should be followed by all containers that want to call themselves J2EE compliant


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
syed mashadi
Greenhorn

Joined: Jun 06, 2008
Posts: 8
[Edit: thread hijack removed. Please ask new questions in new topics]
[ June 07, 2008: Message edited by: Bear Bibeault ]
Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
Nice link. It clearly answers the question. In summary, following is the order of precedence from low to high.

1.Timout specified for the web/application server
2.Timeout specified in web.xml
3.Timeout set in code using setMaxInactiveInterval

The reason behind this is that the timeout specified at more granular level is given higher precedence.
Any J2EE compliant server should follow the above.


Thanks and Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session timeout