This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session time out confusion  RSS feed

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpSession.setMasInactiveInterval().

In the spec I found

By definition, if the timeout
period for a session is set to -1, the session will never expire.



But, in API doc it says:

A negative time indicates the session should never timeout.



Which is correct for the exam?
[ March 02, 2007: Message edited by: Tridib Samanta ]
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

for setMaxInactive method , if you pass the argument as negative time the session will never expire .

Whereas in the DD if you set session timeout as 0 or negative the session never expires...

Hope i am correct ...? ranchers.

Regards
Rishi
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rishi,

read this thread

it has all the time outs - for sessions and cookies.
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your replies!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!