wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes session.setMaxInactiveInterval(int) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "session.setMaxInactiveInterval(int)" Watch "session.setMaxInactiveInterval(int)" New topic
Author

session.setMaxInactiveInterval(int)

Milesh Bhana
Greenhorn

Joined: Feb 18, 2010
Posts: 5
I've noticed a discrepancy with this.

session.setMaxInactiveInterval(0);

HFSJ and Enthuware mock exams say using a value of 0 will immedately invalidate a session.

JEE6 API Javadoc:
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.
An interval value of zero or less indicates that the session should never timeout.

I tried on tomcat and session stayed alive.

What gives?


OCJP6 88%, OCWCD6 92%
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1665
    
  25

Hi Milesh,

Have a look here

Regards,
Frits
 
jQuery in Action, 2nd edition
 
subject: session.setMaxInactiveInterval(int)