You need whatever class that maintains the hash (maybe the hash itself) to implement the HttpSessionBindingListener.  You then need to store the listener as an attribute to each session that registers with you.  When the session dies, it will notify your object, and it will tell you which session it was associated with.
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rakesh
Sent: Thursday, August 16, 2001 9:43 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: session ids

Hi Greg,
 
I know that this sessioncontext api is currently deprecated.
I require this for a very specific reason. When I log-in a user,
I save his loginID and the sessionId in a static hash table.
 
and when he is logged out, I remove it. Each time someone tries
to log-in, I check in to the hash to see if he is already logged in and
display appropriate error messages to him.
 
When he logs out by clicking on a logout.do, I remove his
loginID from the hash and invalidate his session. Now what happens; if
he just closes the browser window, or if his session is timed out ?
How do I remove his name from the Hash ?
 
Kindly help.
 
 Rakesh Ayilliath
 
 
 
----- Original Message -----
Sent: Thursday, August 16, 2001 9:54 PM
Subject: RE: session ids

I don't believe you can get all valid sessionIDs from the server.  I think the API for doing so was deprecated a while back for security reasons.  The way I've solved this in the past was to have each session register itself into a application-scoped hashmap, and maintain that map myself.
 
--Greg
 

 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rakesh
Sent: Thursday, August 16, 2001 12:28 AM
To: [EMAIL PROTECTED]
Subject: session ids

Hi ,
 
Is there anyway I can get all valid session ids from the server ?
 
 
 Rakesh Ayilliath
(Software Engineer)
 
Synergy IT Innovations Pvt Ltd,
#196, 1st Floor, 9th Cross,
HMT Layout, RT Nagar
Bangalore 560032
 

Reply via email to