You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Muller <mm...@theworld.com> on 2003/07/08 06:10:41 UTC

how to access tiles defs in inserted jsp ?

How do I access the value of a tiles setting from a JSP that is inserted 
into a template?  For instance, in the following scenario, I want a 
rendering of "myTilesPageDef" to say "<b>foo = bar</b>", but it just 
says "<b>foo = </b>".  I've tried some ugly hacks, which in addition to 
be ugly, didn't work.

Help!

Thanks,

   -- Mike

tiles-defs.xml:

   <definition name="myTilesPageDef" path="myPageTemplate.jsp">
     <put name="body" value="myBodyImpl.jsp" />
     <put name="foo" value="bar" type="string" />
   </definition>

myPageTemplate.jsp:

   <b><tiles:insert attribute="body" /></b>

myBodyImpl.jsp:

   foo = <tiles:insert attribute="foo" />





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