• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to show 2 JSP on a webpage split screen

 
Kumar Manthri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is my first posting, I have 2 outputs from a JSP file which is shown on different webpage. How do I show this in 1 webpage. I both the outputs to be showed in one webpage butin a split screen manner.
please help
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you want to be using a frameset with the two JSP's in separate frames. This way you can provide optional scroll bars for the two pieces of the screen, specify sizes, etc.
You can do it w/o frames if you like (more of an HTML purist approach) by using a third JSP that does a couple of <jsp:include>'s inside of an HTML table layout (this gives you control of how much real estate each page gets, and you can use broders to get that split screen look).
If you want the two parts of the screen to re-load or submit separately, then you should probably go with the frames approach. It depends on what sort of behavior you want to provide.
Hope this helps.
 
Kumar Manthri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the tip, can you show me a sample as just to show 2JSPs in one webpage
Thanks
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I don't have time to construct a demo for you, but here is an HTML frames reference that you should find useful. Just point the src attributes of the <FRAME> tags to your JSP's.
Oh, and if the client is not accepting session cookies, then the frameset may to be a JSP file as well, in order to maintain session state. If you can use session cookies, then I think that a regular HTML file will suffice for the frameset.
[ May 14, 2003: Message edited by: Philip Shanks ]
 
Kumar Manthri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the help, I just have one more problem
I use the below code HTML codeto send a query to the 1 of the JSPs
<FORM method="post" action="goo.jsp" METHOD="GET">
<input type="text" name="sample">
<input type="submit" name="Search" value="Search">
how do I send the output of the goo.jsp to this split screen
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to read up on the "target" atrribute of the <FORM> tag. With that attribute you can specify that the result is sent to a specific target, which can be a frame or a child window.
[ May 14, 2003: Message edited by: Philip Shanks ]
 
Kumar Manthri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help
but you see where this code is
<FORM method="post" action="goo.jsp" METHOD="GET">
<input type="text" name="sample">
<input type="submit" name="Search" value="Search">
</FORM>
there should be no split screen the results of goo.jsp should appear in a split screen
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kumar,
in the frameset.html you specify names for both "screens" ( in example of the link Philip posted, e.g. it's "main" and "menu" )
<FORM method="post" action="goo.jsp" METHOD="GET" target="main">
cb
 
Debashish Chakrabarty
Ranch Hand
Posts: 231
Firefox Browser Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apropos the initial post, another way to display the two JSPs in a split-frame way would be to use IFrames. Have a JSP with two IFrames displaying your these two JSPs..not a bad idea I suppose
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Debashish offered:
Apropos the initial post, another way to display the two JSPs in a split-frame way would be to use IFrames. Have a JSP with two IFrames displaying your these two JSPs..not a bad idea I suppose

Personally, I tend to shy away from the "bleeding edge" tags. There are still way too many older browsers that don't support them. There are, after all, still a significant number of web developers that won't even use FRAME's.
That being said, I have seen this approach used to nice effect in providing "drop down" style navigation menus. Visibility of the IFRAME element is controlled by mouseover, and the IFRAME's are filled by JSP's.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic