• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

2 Inconsistencies in session-timeout and setMaxInactiveinterval

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 inconsistencies in the way the session-timeout tag of the DD and setMaxInactiveInterval() method of HttpSession work :

1. The session-timeout value is specified in minutes, while the setMaxInactiveInterval() method accepts seconds.

2. A session-timeout value of 0 or less means that the session will never expire, while if we want to specify that a session will never expire using setMaxInactiveinterval method, a negative value (not 0) is required.

Is the second statement correct?
I think we can test it and see but what's your answers ?
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setMaxInactiveInterval :
-> A negative time (in seconds) indicates the session should never timeout.
session-timeout :
-> If the timeout is 0 or less (in minutes), the container ensures the default behaviour of sessions is never to timeout.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. it's True. i verified it ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic