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 Servlets & Session Handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets & Session Handling" Watch "Servlets & Session Handling" New topic
Author

Servlets & Session Handling

Srinath Kadaba
Greenhorn

Joined: Jan 10, 2001
Posts: 2
I am bit confused in the session handling stuff , does the closing of a browser means that the session has ended ? or should the user explicitly end the session ? or perhaps somebody care to explain what is the session ?
Preethi Suryam
Ranch Hand

Joined: Nov 17, 2000
Posts: 92
Hi Srinath!
Session tracking is a mechanism that servlets use to maintain the state about a series of requests from the same user
(that is, requests originating from the same browser) across some period of time.
A session expires when the browser is closed.You can explicitly end a session also using the HttpSession's method setMaxInactive Interval(int interval).Hope this clears ur doubt.
Good Luck!
Preethi
prakash muthu
Ranch Hand

Joined: Sep 06, 2000
Posts: 75
Hello Preethi,
I want to tell you one thing that session will be available after the closing of the browser also. bcoz it will be in server. its not like cookies.
with regards
Prakash


Prakash.M<BR>Bangalore- India<BR>(prakashem@rediffmail.com)
Preethi Suryam
Ranch Hand

Joined: Nov 17, 2000
Posts: 92
Hi Prakash!
Fine i agree with u, but i had a doubt can we retrieve the session back when the browser is closed and how?can u pls explian me about it.
Regards!
Preethi
Srinath Kadaba
Greenhorn

Joined: Jan 10, 2001
Posts: 2
Hi Preeti,
The reason for this question was even after closing the browser I was able to get into my yahoo mail account without typing the password which means (I assume) the session is still active. Does this mean that the session is server dependent ie., set by the programmer ?
thanks
Srinath
Preethi Suryam
Ranch Hand

Joined: Nov 17, 2000
Posts: 92
Hi Srinath!
I don't agree with u.b'coz u cannot login to ur account with out entering ur password, once u have closed ur browser.u got to give ur password.As far my knowledge goes session is not server dependent.if yes pls enlighten me.
Regards!
Preethi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets & Session Handling