Thank you for your reply Joe.

I have tried that and the isRequestedSessionIdValid() method returns false because the user must leave my site, hence they lose the reference to their session. What I am doing is supplying a url to that site that notifies a servlet on my end. To the url I append the session id. In the servlet I want to take that session id (which at this point has no session object it belongs to) and verify that the session is still active on my site for verification of the record. I hope all this makes sense.


On Friday, January 3, 2003, at 03:43 PM, Joe Barefoot wrote:

This function is part of the servlet API, there's no need to obtain/iterate through the active sessions. The HttpServletRequest can be used:

if( request.isRequestedSessionIdValid() ){
dump(request);
}
else{
.....
}


-----Original Message-----
From: teamgasoline [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 1:34 PM
To: [EMAIL PROTECTED]
Subject: obtaining all current sessions in tomcat


Hello --

This isn't really a struts question, but I have found  a lot of good
answers searching this list so I thought this might be an
easy one for
the smart people here.

I have a situation where the user must go to another website
to obtain
some info. That site then hooks back into mine with a url that I
provide, which is a servlet. The problem is I lose the session object
while the user is doing their business at the other site. What I want
to do is verify that this is the same user and dump to a database.
Right now I add the session id to the servlet url (which is called by
the other site when the user is done there),  then in the servlet I
want to cycle through all the current session id's that tomcat has
active (This is just for verification/security). If that current
session is present (which it should be) I go ahead with dump, if not
other action taken. The question is where do I look for and how do I
get to the active session id's that are currently be used by tomcat.


Thanks for all the help.


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to