Session Tracking
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abbass_Abidi
Posted On:   Tuesday, September 3, 2002 06:52 PM


How can I know that the Sesseionid coming from user end
is the same which server has.
Is there any comparision method between the session id's
on the server and session id coming from user'end in the
form of cookie.

Re: Session Tracking

Posted By:   Jorgen_Nordqvist  
Posted On:   Wednesday, September 4, 2002 11:23 PM

The session id coming back in the HTTP request message from the user is the same as the session id the server wrote out originally as part of the cookie you created with the request.getSession(true) statement.

Given that, all you normally need to do in order to test for a valid session is the following:


HttpSession session = request.getSession(false);
if (session != null)
System.out.println("Found valid session");
else
System.out.println("No session found");


Jorgen

About | Sitemap | Contact