struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject Tiles: pass "title" value to header page
Date Wed, 10 Jul 2002 00:46:56 GMT
I have a simple page definition that looks like this:

<tiles:insert page="basicLayout.jsp">
 <tiles:put name="title" value="Music Index Home"/>
 <tiles:put name="header" value="header.jsp"/>
 <tiles:put name="footer" value="footer.jsp"/>
 <tiles:put name="sidebar" value="menu.jsp"/>
 <tiles:put name="body" value="mainBody.jsp"/>

I'm thinking that it might be good to code "header.jsp" so it shows the "title"
string, by reference, instead of hard-coded, so I don't have to write it twice,
in two different places.  I would have to somehow "pass" the value provided for
the "title" attribute to "header.jsp" so it can read it as a request attribute,

What are the various ways I could achieve this (hopefully without using
scriptlets)?  Is this a reasonable thing to do?

If I could send "request parameters" or "attributes" with "tiles:insert", then
with my "tiles:insert" tag for the "header" attribute, I could pass the output
of "tiles:getAsString" to get the "title" field.  I don't know if this is
possible, however.

David M. Karr          ; Java/J2EE/XML/Unix/C++

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

View raw message