• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in setMaxInactiveInterval

 
raja ram
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Which of the following values used with setMaxInactiveInterval() will not cause the session to expunge.

1.-1
2.-2
3.0
4.1
5.2

My answers are 1,2,3 but correct answers given are 1,2 why not 3

Thanks
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the specs:

setMaxInactiveInterval()
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. A negative time indicates the session should never timeout.

So a zero value will cause the container to immediately expunge the session!

Rufus.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic