Search code examples
jakarta-eelayouttiles2apache-tiles

Apache Tiles - is it useful when not using Table Layout?


according to 13 Reasons Why CSS Is Superior to Tables in Website Design

it's much better use CSS layout than table layout ,

now , All Tiles examples uses Table-Layout to insert the tiles

<table  border="2"  width="300"  bordercolor="Gray">
  <tr>
    <td  bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td>
  </tr>
  <tr>
    <td><tiles:insert attribute="header"/></td>
  </tr>
  <tr>
    <td><tiles:insert attribute="body"/></td>
  </tr>
</table> 

my question is , is it useless/pointless to use Tiles framework when using CSS-Layout ? something like this? or .. Does it kill Tiles?

<body>
    <div id="header">
       <div id="headerTitle"><tiles:insertAttribute name="header" /></div>
    </div>
    <div id="content">
       <tiles:insertAttribute name="body" />
    </div>
    <div id="footer">
       <tiles:insertAttribute name="footer" />
    </div>
</body>

?

Thanks


Solution

  • No, it doesn't eliminate its need. Even if the order of your divs is not important because the layout is done with CSS, you don't want to repeat the header and footer divs in every JSP of your application. The HTML head is also something you don't want to repeat. So it's still better to put them in a layout page, once and for all, ant to only put the body content in every page of the application.