In our project we have decided to use tiles to control the layout. 2 ways we are contemplating are:
1. Use tiles.xml and provide the definition of the pages there based on template JSP pages
2. Use a different JSP as a definition for a template.
Say I have a template.jsp, such as
<div id="level1"> <div id="topBar"> <tiles:insert attribute="header" flush="false"/> </div> <div id="level2"> <tiles:insert attribute="body" flush="false"/> </div> </div> Approach 1 will use a xml definition file as
tiles-def centralizes all your templates definitions declaratively. you can define master templates and simply define areas to instert tiles and reuse the master template. this is the prefer way just as everything is declarative nowadays for simpler maintenance (look at validation and DynaActionForm in struts from v.1.0 to v.1.1).
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>