aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt in setMaxInactiveInterval Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Doubt in setMaxInactiveInterval" Watch "Doubt in setMaxInactiveInterval" New topic
Author

Doubt in setMaxInactiveInterval

raja ram
Ranch Hand

Joined: Mar 02, 2008
Posts: 169
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

Joined: Aug 21, 2008
Posts: 83
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Doubt in setMaxInactiveInterval
 
Similar Threads
q on session time out
Make JSP Page alive
2 Inconsistencies in session-timeout and setMaxInactiveinterval
Keeping Session Alive
increase session life time