On Sat, 15 Jan 2000, Kevin Jones wrote:

> I'm with Milt here - you may see that when you restart the browser
> you're now in a new session but (unless you've used persistent
> cookies) that is to be expected. Do you see the session time out in
> the servlet engine?

That's a good way of putting it -- the fact that you have a new
session when you restart your browser has nothing to do with whether
or not the session has been invalidated on the server -- it's just
that that old session is no longer accessible.

As to persistent cookies, I assume you're talking about the cookie
that contains the session id.  I'm not sure the earlier JSDK specs
said much about that cookie, but I believe the newest spec (2.2) does
cover it, including specifying what the name on the cookie has to be,
and that it's age/expiration must be set so that the cookie is gone
when the browser quits and is not persisted (I'm not 100% sure about
that latter part, but I think I remember hearing it).

Of course, if sessions are being handled via URL rewriting, that's a
whole different story, and I'm not as clear on that.


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Milt
> Epstein
> Sent: 15 January 2000 20:39
> To: [EMAIL PROTECTED]
> Subject: Re: [Re: Help : Session Life Cycle in Servlet and
> SessionTimeOutparameter]
>
>
> On Sat, 15 Jan 2000, Jean Bresse wrote:
>
> > Hi Milt, hi Kevin:
> >
> > Just an add-on to your exchange of information.  I tackled the same
> > question a few weeks ago and found the following:
> >
> > - Closing the browser (that is terminating the executable)
> > invalidates the session.  I don't know if there are cases where this
> > is not so, but so far with my environment this is so for Netscape
> > 4.7 and IE5.
> >
> > Keep in mind however, that, in the case of Netscape, one could be
> > under the impression that the executable has terminated if you
> > closed the browser.  If you use Netscape's mail utility, then the
> > netscape.exe is STILL running, and therefore, although there is no
> > browser GUI, the executable has not been terminated.  In that case,
> > the session would still be there...
> [ ... ]
>
> What makes you believe this?  AFAIK, this should not be the case.  The
> session is a purely server-side thing, and nothing that happens on the
> client-side should affect it.  In fact, the server really has no way
> of knowing that the browser closed.
>
> Now, the session may not be accessible as easily, since the cookie
> that contains the session id is no longer available (it existed on the
> client-side).  But that is something different.
>
>
> > Milt Epstein wrote:
> >
> > > On Fri, 14 Jan 2000, Ashok Kumar wrote:
> > >
> > > > Kevin,
> > > >
> > > >   Thanks for the reply but my question still remains unanswered. I
> would
> > > > really appreciate if you could throw some more light in this area. I
> guess I
> > > > am missing something.
> > > >    I understand that Session time out depends upon Server and
> controlled by
> > > > MaxSessionTimeOut parameter.
> > > >     My question is how does server decides to end the session? Does it
> times
> > > > out each sessions after MaxSessionTimeOut interval regularly or It
> does so
> > > > only if session is inactive (i.e. No activity going on in that session
> for
> > > > MaxSessionTimeOut interval, and browser is just lying open/closed
> whatever).
> > >
> > > Basically, two things cause a session to end ("be invalidated") -- a
> > > period of inactivity equal to the timeout interval, or an explicit
> > > call to the invalidate method.  And you should be able to set the
> > > timeout interval.  (Note that this may not have been true/clear in
> > > earlier versions of the JSDK spec, so you want to make sure you're
> > > using a servlet engine/container that implements a more recent version
> > > -- 2.1?)
> > >
> > > >     If you opened a browser and working in it, are you guaranteed that
> same
> > > > session will exist as long as you are doing something?
> > >
> > > Basically, yes.
> [ ... ]

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
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

Reply via email to