Hi Sian,
Most of the Servlet engines have a controllable variable which
controls the Session time out, you will have to read the docs for the
Servlet engine u are using.
If the user is not active for that time the servlet engine
invalidates the session, and when the session is invalidated all the objects
stored in the session are dereferenced.
Manish Singh
May the Force be with you
> -----Original Message-----
> From: Sian Soon Yee [SMTP:[EMAIL PROTECTED]]
> Sent: Sunday, January 07, 2001 12:27 PM
> To: [EMAIL PROTECTED]
> 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