You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Barney Hamish <Ha...@ect-telecoms.de> on 2003/01/21 11:29:35 UTC

RE: Doing something on the server when user session expires

Try defining a finalize method in an object that resides in the user's
session. When the session is destroyed that object's finalize method will be
called.
Hamish

> -----Original Message-----
> From: Renato Romano [mailto:r.romano@set-network.com]
> Sent: Tuesday, January 21, 2003 11:31 AM
> To: 'Tomcat Users List'
> Subject: Doing something on the server when user session expires
> 
> 
> Is it possible to activate a method call when a user session expires,
> independently of the client browsing activity ? A mean, for example: a
> user logs in, then stops his activity for 30 minutes. 
> Supposed that user
> sessione expires after 20 minutes, when he tries to access a 
> page tomcat
> automatically detect that his session expired and shows the user the
> login page, but that happens only when he request a (protected) page,
> that is at time 30; I want to do something exactly when user session
> expires, that is at time 20. Is it possible ?? Thanks a lot
> 
> Renato
> 
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
> 
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Doing something on the server when user session expires

Posted by Daniel Brown <gm...@blueyonder.co.uk>.
When the session is created, you could store an object that implements the
'javax.servlet.http.HttpSessionBindingListener' interface.

When the session is invalidated, that object will receive an event,
according to the doco, just after the session has been invalidated, or
expired. The interface gives access to the session object in question, so
should hopefully get you closer to where you want to be.

Dan.

> -----Original Message-----
> From: Barney Hamish [mailto:Hamish.Barney@ect-telecoms.de]
> Sent: 21 January 2003 10:30
> To: 'Tomcat Users List'
> Subject: RE: Doing something on the server when user session expires
>
>
> Try defining a finalize method in an object that resides in the user's
> session. When the session is destroyed that object's finalize
> method will be
> called.
> Hamish
>
> > -----Original Message-----
> > From: Renato Romano [mailto:r.romano@set-network.com]
> > Sent: Tuesday, January 21, 2003 11:31 AM
> > To: 'Tomcat Users List'
> > Subject: Doing something on the server when user session expires
> >
> >
> > Is it possible to activate a method call when a user session expires,
> > independently of the client browsing activity ? A mean, for example: a
> > user logs in, then stops his activity for 30 minutes.
> > Supposed that user
> > sessione expires after 20 minutes, when he tries to access a
> > page tomcat
> > automatically detect that his session expired and shows the user the
> > login page, but that happens only when he request a (protected) page,
> > that is at time 30; I want to do something exactly when user session
> > expires, that is at time 20. Is it possible ?? Thanks a lot
> >
> > Renato
> >
> > ____________________________________
> > Renato Romano
> > Sistemi e Telematica S.p.A.
> > Calata Grazie - Vial Al Molo Giano
> > 16127 - GENOVA
> >
> > e-mail: r.romano@set-network.com
> > Tel.:   010 2712603
> > _____________________________________
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>