This doesn't work. In the case you show below, the title ends up being:

  "<b> <bean:message key="publish.title" />  </b>"

Troy

> Luckly someone answered this last week: 
> 
>  <template:put name="title" direct="true">
>    <b> <bean:message key="publish.title" />  </b>
>   </template:put>
> 
> 
> Troy Hart wrote:
>> 
>> I am using struts-template.tld and I want to be able to use my
application
>> resources to get the correct title for any given page. I thought I had
seen
>> this talked about somewhere but I can't find it anyplace in the mail
>> archives. I'm sure people that use struts templates must be doing this,
but
>> I'm just not seeing how right now. It seems to me that I need a tag that
>> works similar to:
>> 
>> <bean:message key="somePage.title"/>
>> 
>> Except that it needs to expose a scripting variable with the value,
instead
>> of writing it to the output stream. Maybe the message tag could be
extended
>> to include an "id" parameter which, if set, stores the value in a page
>> scoped attribute with the given name... This way I could do something
like
>> this:
>> 
>> ...
>> <bean:message id="pageTitle" key="somePage.title"/>
>> <template:put name="title" content="<%= pageTitle %>" direct="true"/>
>> ...
>> 
>> Maybe there is already a mechanism to cleanly accomplish this...any
>> pointers?
>> 
>> Thanks,
>> 
>> Troy

Reply via email to