Brilliant! Thanks.
>From: "Mark Galbreath" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >Subject: RE: What happens when our session expires? >Date: Mon, 28 Jan 2002 14:28:38 -0500 > >That's right. Check out the javax.servlet.http.* API. You want to >register >the moment the user becomes unbound from a session so you can write the >form >values to the database (these would be stored as session attributes and >updated as the user moves from field to field in the forms or from form >page >to form page. Any object that implements the HttpSessionBinding Listener >interface is notified when it is bound and unbound from a session. So, for >example, create a helper class or stick a helper method in your controller >servlet to do something like: > >public void valueUnbound( HttpSessionindingEvent event) { > [plug session.getAttribute() returns into update parameters on your >Statement().update() method call through your Connection() String] >} > >This works because whenever this interface is implemented, its valueBound() >and valueUnbound() methods are invoked whenever a session begins and >whenever it ends, respectively. This is how many persistent shopping cart >apps work (e.g., see the JavaOne shopping cart at java.sun.com - it >persists >across sessions). > >Mark > >-----Original Message----- >From: Craig Tataryn [mailto:[EMAIL PROTECTED]] >Sent: Monday, January 28, 2002 10:14 AM >To: [EMAIL PROTECTED] >Subject: RE: What happens when our session expires? > >There you go! That sounds good. So I'm assuming (bare with me, I haven't >done much with session time outs) that you code some type of event >procedure >which is kicked off when the session times out? You can then do cleanup >stuff at this point? > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > Craig W. Tataryn Programmer/Analyst Compuware _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>