You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael <to...@meinsenf.at> on 2002/03/27 18:32:42 UTC

session management

Hi!

I want to create a directory in my file-system for every new session - that's easy!
(there I want to store large files belonging to that session!)

Now I would like to get rid of the directories of older timed-out sessions!!!
.
It would be enough, if every time, when I have to create a new session and a new directory, all session-directories are checked for their valid sessions - and if a directory exists though the session has already timed-out, it will be deleted!

is this possible?

thanks
michi

Re: session management

Posted by Jeff Larsen <la...@qec.com>.
Look at javax.servlet.http.HttpSessionBindingListener.

Say you have a class MyClass that implements HttpSessionBindingListener.
When you call HttpSession.setAttribute("name", myClass), the valueBound()
method of MyClass gets called. Likewise when the session expires or the
object is explicitly removed from the session, the valueUnbound() method
is called.

So if you put a listener in the session attributes, you will know when
the session dies.

Jeff


----- Original Message -----
From: "Michael" <to...@meinsenf.at>
To: <to...@jakarta.apache.org>
Sent: Wednesday, March 27, 2002 11:32 AM
Subject: session management


> Hi!
>
> I want to create a directory in my file-system for every new session - that's easy!
> (there I want to store large files belonging to that session!)
>
> Now I would like to get rid of the directories of older timed-out sessions!!!
> .
> It would be enough, if every time, when I have to create a new session and a new
directory, all session-directories are checked for their valid sessions - and if a
directory exists though the session has already timed-out, it will be deleted!
>
> is this possible?
>
> thanks
> michi


--------------------------------------------------------------------------------


> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>