• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display two different jsp pages in one consolidated jsp page

 
Sunni srivastav
Greenhorn
Posts: 24
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I have jsp pages named

First.jsp,Second.jsp and Third.jsp.
Then is it possible to display First.jsp and Second.jsp together inside Third.jsp...

I mean,in Html we have Frameset tag to divide the pages into frames..so something simliar to that.


 
olivier dutranoit
Ranch Hand
Posts: 81
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

At the end, everything is HTML...so you can still use your frameset...
Jsp is no html and html is no jsp...
search readings about it...
 
Gopakumar Naryanan
Ranch Hand
Posts: 72
Eclipse IDE Hibernate Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why not!!, use <jsp: include page="first.jsp"/> and <jsp:include page="second.jsp"/>

otherwise <@ page file="./first.jsp"> and <@ page file="./second.jsp"/>

Make sure that, which ever the page being included does not contain <html><body> tags.(They can contain but it will be mess).
 
olivier dutranoit
Ranch Hand
Posts: 81
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure you can use include etc...
but do not forget that include is totaly something else than a frameset.

in Html we have Frameset tag to divide the pages into frames..so something simliar to that.


it is not similar
 
Tim Moores
Bartender
Posts: 2946
46
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use frames - they're an idea of the Nineties when frameworks for page composition built on the idea of includes didn't exist. Nobody who's serious about web design uses them any more.

Instead, check out frameworks such as SiteMesh, Struts (with Tiles) and Stripes that have concepts of how to aggregate pages from constituent JSP pieces.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic