struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Stair" <steve.st...@rrc.state.tx.us>
Subject Unable to access "title" attribute in Tiles under layout (1.1-rc1)
Date Mon, 03 Mar 2003 21:44:26 GMT
Inside  /layouts/layout.jsp page, I have the following:

   <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
   <title><tiles:getAsString name="title"/></title>

Which works fine, the page title as defined in the tiles defintion file
is displayed in the browser's title bar


However, when I attempt to use that same title in /tiles/header.jsp

   <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <h1><tiles:getAsString name="title"/></h1>

I get the following error message:

   [ServletException in:/tiles/header.jsp] Error - tag.getAsString :
attribute 'title' not found in context. Check tag syntax' 


I haven't been able to find an example that does this.
So far I've only found an example that statically includes the header
file,
which somewhat defeats the purpose of using Tiles.

My definition looks like this

  <definition name=".app.Base" path="/layouts/layout.jsp">
    <put name="title" value="${title}" />
    <put name="header" value="/tiles/header.jsp" />
    <put name="nav" value="/tiles/nav.jsp" />
    <put name="messages" value="/tiles/messages.jsp" />
    <put name="content" value="${content}" />
    <put name="footer" value="/tiles/footer.jsp" />
  </definition>


--
Steve Stair


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message