IntelliJ Java IDE
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes session.setMaxInactiveInterval(int) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply 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
Rancher

Joined: Apr 07, 2010
Posts: 742

Hi Milesh,

Have a look here

Regards,
Frits
 
IntelliJ Java IDE
 
subject: session.setMaxInactiveInterval(int)
 
Threads others viewed
setMaxInactiveInterval to 0
How to use different session timeouts for different levels of users
Apparently Logout doesn't seem to work in my Application
setMaxInactiveInterval(-1)
HttpSession
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture