Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check if session is valid by given Session ID

843841Jan 19 2005 — edited Jan 19 2005
Hi!

I have an Applet which communicates with a Servlet via HTTP-GET-Requests. The Server (Tomcat) shall check whether the session-id of the requestor belongs to a valid session.

In the client HTML-Page that contains the applet, I use JavaScript (alternatively JSP) to extract the sessionID and pass it to the Applet. The Applet then sends the ID as a GET-Parameter to the Servlet when doing a request.

I wanted to use the method
HttpSessionContext.getSession(String sessionId)
to get the corresponding session, but the Servlet API reference tells me this method ist deprecated without replacement. What else could I use to find out if the Applet belongs to a valid session?

Thanks

Rene
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2005
Added on Jan 19 2005
2 comments
1,700 views