struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paula Coll Lapido" <>
Subject Re: Tiles and Struts: JSP page doesn't compile
Date Thu, 10 Jul 2003 10:34:27 GMT
Just found the solution: I hadn't included the struts taglibs in my body JSP

----- Original Message ----- 
From: "Paula Coll Lapido" <>
To: "struts-user" <>
Sent: Thursday, July 10, 2003 12:13 PM
Subject: Tiles and Struts: JSP page doesn't compile

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" />

2. console.jsp: the main template:

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

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"/>

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

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

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???

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message