0

Here I am started to design a portal wise home,login,register ....around 10 common jsp pages.

Its very hard to create these many jsp pages for each portal ,which is an most elegant way.So decided to split the jsp's into header,body,footer and using common header and footer.each time body is changing.

<jsp:include /header.jsp>...body<jsp:include /footer.jsp>

Some thing like above.But the problem raises now is the header footer design is not same for all portals.

So decide to make each and every block dynamic which settings will come from database like menu list ,palce of blocks etc ...

Which is the best way to do it.I came to know there are few frameworks like Tiles

,Wicket,Sitemash etc ...

And also referred Better alternative to Apache Tiles confused to decide.

Can anyone familiar with those frameworks guide me in a right way ??or suggest any new ways which i am missing.

Using java(servlets),Msql as DB.I'm not using Struts(agreeing that don't know :)).

Thanks for your time.

Community
  • 1
  • 1
Suresh Atta
  • 120,458
  • 37
  • 198
  • 307

1 Answers1

0

IMO Tiles because its stable and vast user base , and good documentation too. It provides good compilation of multiple Jsp into view

example

<definition name="myapp.homepage" template="/layouts/classic.jsp">
  <put-attribute name="title" value="Tiles tutorial homepage" />
  <put-attribute name="header" value="/tiles/banner.jsp" />
  <put-attribute name="menu" value="/tiles/common_menu.jsp" />
  <put-attribute name="body" value="/tiles/home_body.jsp" />
  <put-attribute name="footer" value="/tiles/credits.jsp" />
</definition>

Like wise you can define as many you want , based on the definition name you return from the servlet, tiles would construct the complete JSP for you.Isnt that neat.

They can be integrated with many popular MVC frameworks like

- Spring MVC
- Struts 2.0 

and list goes on.

Sudhakar
  • 4,823
  • 2
  • 35
  • 42