struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Green, Noah" <>
Subject problems with tiles:getAsString in nested tiles?
Date Sat, 29 Nov 2003 01:10:44 GMT

Sorry to bother you all, I've looked thru the archives and seen some similar
threads, but without any clear conclusions.
I'm using a <tiles:getAsString . . . > element in a nested tile, and I'm
getting the following error:

ServletException in:/jsp/layout/mainLayout.jsp] Error - tag.getAsString :
attribute 'title' not found in context. Check tag syntax'

However, this same element works in a tile that is nested at the "top

Here is my tiles-defs.xml:
   <definition name=".testpage"   path="/jsp/testpage.jsp">
      <put     name="title"  value=""/>
      <put     name="body"   value=""/>

   <definition name=".testpage.main"     extends=".testpage">
      <put     name="title"         value="This is my title" />
      <put     name="body"          value="/jsp/layout/mainLayout.jsp" />

Here is my testpage.jsp, where the <tiles:getAsString ....> does work:
        <title><tiles:getAsString name="title" /></title>

     <body bgColor="white">
        <tiles:get name="body" />

Here is my mainLayout.jsp, where the <tiles:getAsString ...> is failing:
  <h2><tiles:getAsString name="title" /></h2>

The end result is that when I use a ForwardAction to go to ".testpage.main",

the <title> element in the page header is populated correctly, but the call
populated the <h2> area fails with the exception.

Any help on why this is happening is much appreciated :-)


Noah Green
Fixed Income Analytics
work: 212.526.1689
cellular: 917.406.4930
fax: 646.758.2306

This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.

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

View raw message