Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session timeout

 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankit,
Please find the link..if it can satisfy your question.
HTTP Session time-out Override Precedence Summary
 
Baseet Ahmed
Ranch Hand
Posts: 225
Java Notepad Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patil,

Nice info.

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

Regrds
Baseet Ahmed
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
syed mashadi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Edit: thread hijack removed. Please ask new questions in new topics]
[ June 07, 2008: Message edited by: Bear Bibeault ]
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic