File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Question about HttpSession Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Question about HttpSession" Watch "Question about HttpSession" New topic
Author

Question about HttpSession

Benny Tang
Greenhorn

Joined: Aug 03, 2003
Posts: 26
Dear all,
When the user close the browser, is the session terminate immediately or it will timeout after a specific period of time?
Thank you for your kind attention.
Yours faithfully,
Benny
ib idris
Greenhorn

Joined: Aug 02, 2003
Posts: 29
The session is terminated immediately.
http://galileo.spaceports.com/~ibidris/
Gayathri Prasad
Ranch Hand

Joined: Jun 25, 2003
Posts: 116
Hi,
Sessions would be terminated the moment we close the broswer Yes I know this .. But how abt some thing called Server side cookies and When we keep time out for server side cookies would they be active even If I close by browser window ?. Lil more knowledge on server side cookies would help mr frnds ...

Cheers,
Gaya3
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12324
    
    1
Clarification -
1. The browser destroys the cookie that contains the sessionID when it is shut down because that terminates a session.
2. The servlet engine DOES NOT destroy the HttpSession object immediately because it does NOT know that the browser can't use it anymore. Instead, the session will be disposed after a period of inactivity - typically 30 minutes.
3. "Server side cookies" ?? is a meaningless term - unless you are talking about the Cookie object used to represent a cookie as sent by a browser in a request or set by the servlet in a response.
Bill


Java Resources at www.wbrogden.com
 
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: Question about HttpSession
 
Similar Threads
Happy Birthday!
Java popular in India?
Burnout
WA #1.....word association
Role and Experience