Re: Detecting a login or logoff event

2011-10-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chema, On 10/6/2011 10:23 AM, Chema wrote: > 2011/10/6 Martin O'Shea > >> >> Detecting a logoff is easier using the sessionDestroyed method. >> > > How do you detect that an user is closing his browser ? You cannot. The best you can hope for is

Re: Detecting a login or logoff event

2011-10-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, On 10/6/2011 9:29 AM, Martin O'Shea wrote: > I need to be able to intercept a successful authentication of a > login / logout request which can then be used to make a series of > system updates to record the fact. > > So, if John Doe has just

Re: Detecting a login or logoff event

2011-10-06 Thread Chema
2011/10/6 Martin O'Shea > > Detecting a logoff is easier using the sessionDestroyed method. > How do you detect that an user is closing his browser ?

RE: Detecting a login or logoff event

2011-10-06 Thread Martin O'Shea
a login or logoff event > From: Martin O'Shea [mailto:app...@dsl.pipex.com] > Subject: Detecting a login or logoff event > I need to be able to intercept a successful authentication of a login > / logout request which can then be used to make a series of system > updates to rec

RE: Detecting a login or logoff event

2011-10-06 Thread Caldarale, Charles R
> From: Martin O'Shea [mailto:app...@dsl.pipex.com] > Subject: Detecting a login or logoff event > I need to be able to intercept a successful authentication of a > login / logout request which can then be used to make a series > of system updates to record the fact. &

RE: Detecting a login or logoff event

2011-10-06 Thread Martin O'Shea
Unfortunately I'm not using spring in my application but thanks anyway. -Original Message- From: Chema [mailto:demablo...@gmail.com] Sent: 06 Oct 2011 15 02 To: Tomcat Users List Subject: Re: Detecting a login or logoff event For logout, you can implement a HttpSessionListener . I

Re: Detecting a login or logoff event

2011-10-06 Thread Chema
For logout, you can implement a HttpSessionListener . It has got a method: public void sessionDestroyed(HttpSessionEvent se) It's invoked when http session is invalidated. ( session.invalidated() ) So, you have to invalidate http session when user makes logout ( i.e, user clicks a logout button

Detecting a login or logoff event

2011-10-06 Thread Martin O'Shea
I need to be able to intercept a successful authentication of a login / logout request which can then be used to make a series of system updates to record the fact. So, if John Doe has just logged in successfully, an update is made to his session like: session.setAttribute("loggedIntoSession",