It is not a problem with Struts, but with JSP : you can't nest a tag inside a
tag.
The correct way to do this, with template, is :
<template:put name='title'><bean:message key="index.title"/></template:put>
Solution provided by Chris is also a possibility, but you need to use Tiles
instead of Templates ;-)
Cedric
Chris Means wrote:
> Phil,
>
> I ran into the same problem.
>
> I don't know if my solution was the best approach...but it worked:
>
> replace 4. with:
>
> <template:put name='title' content='index.title'/>
>
> then in your template use:
>
> <tiles:useAttribute id="title" name="title" classname="java.lang.String"
> />
> <title><bean:message key="<%=title %>" /></title>
>
> HTH.
>
> -Chris
>
> > -----Original Message-----
> > From: Phil Miller [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 26, 2002 4:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: bean:message as content of template:put tag
> >
> >
> > Hi, I am developing an internationalized program using struts,
> > and am using
> > <bean:message> tags to display copy in different languages.
> >
> > On my site index page, I'd like to use the <template:put> tag on line 4
> > below to insert my locale specific page title. It seems that
> > struts does not
> > support this. Is there a workaround to this problem?
> >
> >
> > index.jsp.....
> > 1. <%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
> > 2. <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > 3. <template:insert template='/template/template.jsp'>
> > 4. <template:put name='title' content='<bean:message
> > key="index.title"/>'/>
> > 5. <template:put name='advert' content='advert here' direct='true'/>
> > 6. <template:put name='nav' content='/inc/nav.jsp'/>
> > 7. <template:put name='body' content='body here' direct='true'/>
> > 8. </template:insert>
> >
> > Any help would be greatly appreciated,
> > Phil,
> > Chamonix, France
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>