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 ASSIGN a value to a SESSION ID

843835Dec 4 2001 — edited Dec 5 2001
Is it possible to assign a value to a session id?

I did the following code to my JSP (found below) but still it doesn't get the session id I have assigned. Reason I want to do this is because it is not able to retain the same session when my jsp calls a servlet who calls a jsp. Thus I have to assign it manually (I am actually passing the servlet session id as <input type= hidden name=passSession value=123456> to a jsp page and would like to assign this in the session ID of my jsp page). I am using Oracle iAS 102. Tried to configure its configuration files but still not able to maintain 1 session id when passing parameters from jsp to servlet to jsp.

<%
try{
session.putValue("session", "123456");
SesID = (String)session.getValue("session");
}catch(Exception e){
}
out.println("HttpSession.getId()"+session.getId());
%>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2002
Added on Dec 4 2001
6 comments
570 views