Tuesday, October 18, 2005

What is the default life time of Session (or) JSESSIONID Cookies?

1800 seconds (or) 30 minutes

From Spec:

The default timeout period for sessions is defined by the servlet container and can be obtained via the getMaxInactiveInterval method of the HttpSession interface.

Example Code:

HttpSession session = request.getSession();

System.out.println("default timeout period for sessions : " + session.getMaxInactiveInterval());

Be careful not to assume that sessions expire as soon as they reach their expirey time, sometimes they only get closed by a very low level thread some time after they have timed out.


Blogger Michelle said...

Google Opens 8 Book Search Sites in Europe
Google Opens 8 Book Search Sites in Europe : This will further alienate book publishers: Google ... (with Intermix), it is happening in Australia: News Corp.
Hi, I was just blog surfing and found you! If you are interested, go see my eliminate unwanted pregnancy related site. It isnt anything special but you may still find something of interest.

11:13 PM  

Post a Comment

<< Home