I am currently implementing tiles on my webapp, using definitions. I have the 
following files:

1. tiles-defs.xml --> defining the main template as follows:

  <definition name="brm.consola" path="/templates/console.jsp">
   <put name="useBean" value=""/>
   <put name="header" value="/templates/header.jsp" />
   <put name="body" value="/blank.html"/>
   <put name="footer" value="/templates/footer.jsp" />
  </definition>

2. console.jsp: the main template:

<html:html locale="true">
<head>
 <title><bean:message key="global.titulo"/></title>
<script language="JavaScript1.2" src="<%= 
request.getContextPath()%>/js/util.js"></script>
<link rel="stylesheet" href="<%= request.getContextPath()%>/css/brm.css" 
type="text/css">
<tiles:insert attribute="useBean"/>
</head>
<body>
<table width="100%" cellspacing="10" cellpadding="0" border="0">
 <tr>
  <td>
   <!-- cabecera -->
   <tiles:insert attribute="header"/>
  </td>
 </tr>
 <tr>
  <td>
   <!-- cuerpo -->
   <tiles:insert attribute="body"/>
  </td>
 </tr>
 <tr>
  <td>
   <!-- pie -->
   <tiles:insert attribute="footer"/>
  </td>
 </tr>
</table>
</body>
</html:html>

3. Several pages with associated body pages, for example:

--------- page.jsp ------------

<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>

<tiles:insert definition="brm.consola" flush="true">
 <tiles:put name="body" value="/tbMenu/body/page_body.jsp" type="page"/>
</tiles:insert>

--------- page_body.jsp -------------

<html:form action="findTB.do">
<html:hidden property="method" name="method" value="retrieveTB" />
<table width="100%" cellspacing="5" cellpadding="0" border="0">
 <tr>
  <td><bean:message key="tb.text.tiposervicio"/></td>
  <td>
   <html:select property="srvc_id">
    <html:optionsCollection name="TBSearchForm" property="srvcList"/>
   </html:select>
  </td>
 </tr>
 <tr>
  <td><bean:message key="tb.text.fechaservicio"/></td>
  <td>
   <html:text name="TBSearchForm" property="date_day" maxlength="2" size="2"/>
   <html:text name="TBSearchForm" property="date_month" maxlength="2" size="2"/>
   <html:text name="TBSearchForm" property="date_year" maxlength="4" size="4"/>
  </td>
 </tr>
 <tr>
  <td>&nbsp;</td>
  <td>
   <html:submit property="" >
    <bean:message key="tb.button.buscar" />
   </html:submit>
  </td>
 </tr>
</table>
</html:form>

The problem I have is that when I invoke my page.jsp, all the content gets rendered 
(the template: console.jsp and the default header, footer, etc.), BUT the inner body 
page, page_body.jsp, IS NOT COMPILED, it's rendered as text output, so my HTML result 
doesn't display the body content (logically, the navigator can't make anything out of 
struts tags!).

Does anyone have an idea of what's happening???

Reply via email to