Hi,
A better idea might be to look at the
javax.servlet.http.HttpSessionBindingListener interface. This might help you
to delete the file the moment the session becomes invalid.
Regds,
Gokul
----- Original Message -----
From: "Bartsch Axel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 7:33 PM
Subject: [SERVLET-INTEREST] invalidating stale sessions or objects linked to
a sessionId
> Hi,
>
> Is there a possibility to invalidate stale sessions and to delete objects
linked to a no more valid session?
>
> My problem:
> In my processing I create a file using the sessionId as filename.
> If now the user does not correctly log off and instead just does nothing
or closes his browser the session will at some time become invalid (latest
at closing the browser).
> But the file will rest forever:
> So my idea was to search at each new login all existing such (in a special
directory) files, to compare their filenames with all still valid session
Ids. And if a certain session Id is not valid anymore I would have deleted
the file.
>
> Now how can I find all valid session Ids. This was possible using the
HttpSessionContext class. But in the API description is written that this
interface will be deleted as of Servlet API 2.1.
>
> Is there another possibility to find all valid session Ids or to check if
a certain session Id is still valid?
>
> Axel Lannion/France
>
>
___________________________________________________________________________
> 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
- invalidating stale sessions or objects linked to ... Bartsch Axel
- Re: invalidating stale sessions or objects l... Gokul Singh
- Re: invalidating stale sessions or objects l... Tim Panton-Westpoint Ltd
