Take a look at the HttpSessionBindingListener interface. I believe that's
what you want.
--
Martin Cooper
Tumbleweed Communications
----- Original Message -----
From: "Sian Soon Yee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 06, 2001 10:57 PM
Subject: How to know whether my session has expired?
> Hi friends,
>
> I am still a student doing my final year
> project and is new to servlet development, and have
> some simple questions hope your could help me answer.
> Let say I am doing a project in e-commerce which
> uses servlet, I have created a shopping cart servlet
> which insert the item selected by the user into a
> database table call temp-shopping-table together with
> the user session ID.
> The item would be kept in the table until
> the user check out and the data transfer to another
> table call receipt_table, this is of cozs an ideal
> case. But what if the user halfway leave the site,
> leaving all the data in my temp-shopping-table.
> What i want to ask is. Is it possible for
> my shopping cart servlet to automatically delete the
> data in my temp-shopping-table when the session is no
> longer valid?? And how can i check whether the user
> session has expired??
> Another other suggestion that is better
> than my way of keeping the shopping cart are welcome .
> Thanks in advance.
>
> Regards,
> ssy
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
>
>
___________________________________________________________________________
> 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
___________________________________________________________________________
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