• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setMaxInactiveInterval(int interval)

 
Salman Khattak
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"A value of 0 or less means that the session will never expire"
ref: SCWCD Exam Study Kit - Manning Publication - pg 124.
Compare:
"A negative number implies that the session will never timeout."
See:SUN SPECS
Do we have an errata for the Manning book on this?
 
Stephan Staeheli
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now you messed up two things:
In your session-config parameter in web.xml a value of 0 or less means it never expires. This is valid for all sessions existing in your web app.
But your could also use the method setMaxInactiveInterval on your HttpSession object to set the timeout on a specific user session, there your have to use an int less than 0. This is only for the used session.
So there is no errata, just a little 'hhmmmm?' for the Sun guys, but I think it's a historical problem.
 
Salman Khattak
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. Looks like another SUN inconsistency!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic