Ashok;
>>1. Does session exists as long as browser is open
>>and goes away when browser is closed. i.e. If I get
a >>Session using
>> HttpSession session = req.getSession(true);
>> and String ID = session.getId();
>> The Session with ID will exist as long as
>>browser is open and I can keep
>> any info in Session Object for use in other
>>servlets which get invoked
>> from HTML later.
The session is completely independent of the browser,
so closing your browser has no effect on the session.
However, when you create a session, the id of the
session is put into the request header by the browser
every time it submitts a request thereafter. It is
analogous to stamping someone's hand when they come
into a bar so they can get back in later.
1. Just because they leave does not mean they cannot
come back in.
2. If they wipe the stamp off, then they cannot come
back in once they leave.
3. Once the bar closes, the stamp becomes expired and
the next day it will be a different colour and they
will have to get a new stamp.
So the session will not go away when the browser is
closed, but it will eventually time out.
>> 2. What does SessionTimeOut parameter do?
>> Does it invlidates the session when browser
>>is closed or user doesn't send any
>> request after specified time?
>> I just want to make sure whether a Session
>>is invalidated after SessionTimeOut period even if
>> your browser is open and you doing something or
>>not.
You are right. The session will time out even if the
browser is open, but is idle past the timeout period.
If you access the session, however, it will reset the
timeout count, preventing it from timing out. Ideal,
no ?
//Nicholas
Any help will be appreciated.
=====
"Piper, Piper the red red worm
awoke last night to the sound of the storm
the words are the words I sailed upon."
Piper, Phish
--
Nicholas Whitehead
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html