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!

Jsp and frames ?

Status
Not open for further replies.

otty

Technical User
Jan 7, 2003
9
ID
Hi all,
Is it possible to create a Jsp file containing frames ?
If so, i would like to know how to pass the parameters to both frames in the page .
Thankx
 
yes,
this is my example with Tomcat 3.1 (jsp 1.1) & Linux Redhat 6.2

my index.jsp:

<HTML>
<HEAD>
<META name=&quot;GENERATOR&quot; content=&quot;Tomcat 1.3 for Linux&quot;>
<TITLE>Title</TITLE>
</HEAD>
<FRAMESET COLS=&quot;26%,*&quot;>

<NOFRAMES> <P>Need browser which supports frames to see this page</P>
</NOFRAMES>
<FRAMESET ROWS=&quot;74%,*&quot;>
<FRAME src=&quot;pane.jsp&quot; name=&quot;p1&quot;>
<FRAME VALIGN=TOP src=&quot;infos.jsp&quot; name=&quot;infos&quot;>
</FRAMESET>
<FRAMESET>
<FRAME src=&quot;troisieme.jsp&quot; name=&quot;three&quot;>
</FRAMESET>

</FRAMESET>
</HTML>


[sig][/sig]
 
Yes, it can be done, I had to figure it out this very same way. YOu have to pass the parameters into the source of the source of the frame that you are calling.
//START OF JSP PAGE

<%
String ccmid = request.getParameter(&quot;ccmid&quot;);
String memid = request.getParameter(&quot;memid&quot;);
%>

<html>
<head>
<title>TITLE HERE</title>
</head>


<!-- Frames are to be placed in the top of an -->
<!-- HTML page BEFORE the BODY tag -->
<frameset cols=&quot;150,*&quot; border=&quot;0&quot; ID=&quot;TOP&quot;>
<frame name=&quot;LEFT&quot; src=cciframesleft.jsp?ccmid=<%= ccmid %>&memid=<%= memid %> marginwidth=&quot;10&quot; marginheight=&quot;10&quot; scrolling=&quot;auto&quot; frameborder=&quot;0&quot;>
<frame name=&quot;MAIN&quot; src=cciframesmain.jsp?ccmid=<%= ccmid %>&memid=<%= memid %> marginwidth=&quot;10&quot; marginheight=&quot;10&quot; scrolling=&quot;auto&quot; frameborder=&quot;0&quot;>
</frameset>
</frameset>
<body>

</body>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top