0

I have a home.jsp page and a login.jsp page

home.jsp

i have 3 div tags as

div id="header"    
div id="content"    
div id="footer"

1) When i click on Login link in home.jsp page it redirects to login.jsp page,i need: it should be shown on div id="content" tag in home.jsp page.

My Requirement is :: The home.jsp should be my home page..the header and the footer should not change, only the content which ever changes should be displayed in the div tag with id="content"

By using frames i am able to solve this,as we have target=".....", but is there any posssibility of achieving the same using div tag ?

Please Explain with an Example!

09Q71AO534
  • 4,300
  • 13
  • 44
  • 68

1 Answers1

0

i think you will decorator. you will your theme most be fixed in all pages. you can do this with any decorator framework like sitemesh(http://wiki.sitemesh.org/display/sitemesh/Home).
if you will do this without decorator framework you can do as following:

  • create header.jsp
  • create footer.jsp
  • create home.jsp page as following:
    <body>
    <jsp:include page="header.jsp" />
    ....
    home content
    ....
    <jsp:include page="footer.jsp" />
    </body>

  • create login.jsp as following :
    <body>
    <jsp:include page="header.jsp" />
    ....
    login content
    ....
    <jsp:include page="footer.jsp" />
    </body>

i suggest you use a decorator framework. thats better.

Rasoul Taheri
  • 802
  • 3
  • 16
  • 32