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!

Sharing a session between two servlets

843833Sep 11 2001 — edited Sep 13 2001
Hi

Quite a simple problem, I hope but I am having no luck what so ever in solving it.

I need to share a users session between two servlets however once I create the session on one servlet, I can not seem to pass that client session object to the second servlet.

Example: Users logs in via a login page on submit, a servlet is called extracting their username from the HTML form and is used to retrieve info from a database which is then logged in their session data, the servlet then calls another servlet which should then recall the same session and show their data, sadly this is not happening.

I would use a URL re-writting method, but I need to keep the session id away from pryig eyes.

So would I be better off using a RequestDispatcher ?

Any help would be greatfully recieved ??
Many Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2001
Added on Sep 11 2001
4 comments
529 views