If you got an HttpSession from HttpServletRequest, and you didn't invalidate
it yourself, then it's valid.  There's no session you can get which isn't
valid.

Maybe you mean whether it's new?  Call HttpSession.isNew() for that.

Or whether you invalidated it?  You could call isNew() for that, too, and
catch the IllegalStateException it would throw for an invalid session.

                                                            -- Bill K.


> -----Original Message-----
> From: Alin Simionoiu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 17, 2001 2:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Browser Closed
> 
> 
> Corect.
> But this is true for existing session.
> Want I'm trying to find is something like : isSessionValid(Session)
> 
> Alin
> 
> ----- Original Message ----- 
> From: "William Kaufman" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 17, 2001 1:11 PM
> Subject: RE: Browser Closed
> 
> 
> > javax.servlet.http.HttpServletRequest.isRequestedSessionIdValid().
> > 
> >                                                             
> -- Bill K.
> > 
> > 
> > > -----Original Message-----
> > > From: Alin Simionoiu [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 17, 2001 11:34 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Browser Closed
> > > 
> > > 
> > > Is possible to find out if a specific session is no 
> longer valid?..
> > > 
> > > ----- Original Message -----
> > > From: "Milt Epstein" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, May 17, 2001 1:15 AM
> > > Subject: Re: Browser Closed
> > > 
> > > 
> > > > On Wed, 16 May 2001, Alin Simionoiu wrote:
> > > >
> > > > > I think this event as also fired when you browse thru the
> > > > > pages..wright?..  Want I will really like to have is 
> a SessionEnd
> > > > > event...
> > > >
> > > > Basically ... there isn't a generic, catch-all way to 
> do this, so
> > > > you're going to need to rely on the session timeout mechanism.
> > > >
> > > >
> > > > > ----- Original Message -----
> > > > > From: "Richard Draucker" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Wednesday, May 16, 2001 9:26 PM
> > > > > Subject: Re: Browser Closed
> > > > >
> > > > >
> > > > > > Try clicking the logout button with a javascript triggered
> > > > > > by the <body onunload>.  This is how the porn sites feed
> > > > > > you a zillion popups when you try to get outta their
> > > > > > site... ooops, you weren't supposed to know I know that.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, 17 May 2001, you wrote:
> > > > > > > Hello everybody,
> > > > > > >
> > > > > > > I'm implementing a login/logout from a web page.
> > > > > > > Everithing is absolutly fine if the user it's 
> using my logout
> > > button.
> > > > > > >
> > > > > > > But, if the user just close the browser, without 
> > > using the logout
> > > > > button,
> > > > > > > then I'm in trouble.
> > > > > > > Has anybody any ideea if is possible to know when a 
> > > user close the
> > > > > > > browser?..
> > > > > > >
> > > > > > > I'm not using a keep-alive connection.
> > > > > > > Probably is not possible, considering that http 
> is a stateless
> > > protocol.
> > > > > > >
> > > > > > > Alin
> > > > > > --
> > > > > > Richard Draucker,  [EMAIL PROTECTED]
> > > > > > Protected-Data.Com  www.protected-data.com
> > > > > > Remote data support for web developers.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > > Milt Epstein
> > > > Research Programmer
> > > > Software/Systems Development Group
> > > > Computing and Communications Services Office (CCSO)
> > > > University of Illinois at Urbana-Champaign (UIUC)
> > > > [EMAIL PROTECTED]
> > > >
> > > 
> > 
> 

Reply via email to