Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PASSING SESSIONS THROUGH FRAMES

Status
Not open for further replies.

chankoli

Programmer
Apr 7, 2003
1
IN
hi,

I am facing problem in passing sessions through frames...could any one plz help me out.I'm having three pages(validate.jsp,main.jsp & detail.jsp)

In validate.jsp i am creating session,wanna pass this session in the next page main.jsp(which has two frames), and again pass the same seesion in detail.jsp.

I'm not able to get the session in detail.jsp?Plz help me out


validate.jsp
<%
//creating a session
session.putValue(&quot;SESS_CUSTID&quot;,custid);
%>

main.jsp
<%
String valid_cid=(String)session.getValue(&quot;SESS_CUSTID&quot;);
String custname=request.getParameter(&quot;custname&quot;);
%>
<html>
<head>
<title>Library</title>
</head>
<frameset rows=&quot;*,*&quot; frameborder=&quot;NO&quot; border=&quot;0&quot; framespacing=&quot;0&quot;>
<frame name=&quot;topFrame&quot; scrolling=&quot;NO&quot; noresize src=&quot;test_top.jsp&quot;>
<frame name=&quot;mainFrame&quot; src=&quot;detail.jsp?custname=<%=custname%>&quot;>
</frameset>
<noframes>
<body bgcolor=&quot;yellow&quot; text=&quot;#000000&quot; scroll=&quot;no&quot;>

</body>
</noframes>
</html>

detail.jsp
<%
String valid_cid=(String)session.getValue(&quot;SESS_CUSTID&quot;);
out.println(valid_cid);
%>

Looking forward for reply.

Regards,
Chan


 
What you describe should work. If it doe not you have introduced the error in your code or perhaps configuration. If the page that does not have access to the Session variable is installed in a different JSP application on the same server that is one reason the Session variable would not be present. They have “application scope”.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top