struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim D Elcott" <>
Subject Re: <bean:message> in a <tiles:insert>
Date Mon, 29 Apr 2002 04:59:40 GMT
Hi there,

Had this problem before and as a quick work around found that the tile
defintion below worked nicely. Just pass the key to your title as a string
in the tiles definiton and then use a 'hack' to load the text for the key in
your JSP.


    <definition name="doc.mainLayout"
        <put name="title" value="home.title"/><!-- key -->
        <put name="header" value="/jsps/common/header.jsp"/>
        <put name="footer" value="/jsps/common/footer.jsp"/>
        <put name="body" value="doc.portal.body"/>

and in my JSP used

<tiles:useAttribute id="titleKey" name="title"/>
<title><bean:message name="titleKey" scope="page"/></title>

Works a treat!

Hope this help

Tim Elcott.

----- Original Message -----
From: "ajTreece" <>
To: "Struts Users Mailing List" <>
Sent: Sunday, April 28, 2002 11:51 AM
Subject: <bean:message> in a <tiles:insert>

> Folks...
> I've set up some tiles code that allows me to utilize a common look and
feel to
> a table. The tiles code needs two pieces of data to build the table. Here
is an
> example:
> <tiles:insert definition="" flush="true">
>      <tiles:put name="title" value="/home/rasLinksHeader.jsp" />
>      <tiles:put name="body" value="/home/rasLinks.jsp" />
> </tiles:insert>
> It is required that the "title" value be extracted form the messages
> bundle with  the <bean:message key="xxx"/> tag. My challenge is the only
way I
> can get it to work is if the "title" value points to a jsp who's only
action is
> to execute the <bean:message .../> tag. How do I utilize the
<bean:message> tag
> inside the <tiles:insert> block?
> I can handle the flames if this is obvious and I just can't see it....
> Thanks, ajTreece
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do You Yahoo!?
Get your free address at

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

View raw message