Your first example is invalid :

<bean:message key="error.minCharacters"
   arg0="<bean:write name="globals" property="minChars" />" />

A JSP tag cannot be used as attribute value of another tag (XML syntax)

This should work :

<bean:define id="minChars" name="globals" property="minChars" type="String"/>
<bean:message key="error.minCharacters"  arg0="<%=minChars%>" />

Nico.


----- Original Message ----- 
From: "Domingo A. Rodriguez S." <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 1:48 PM
Subject: Re: dynamic arg0 in bean:message?


>
> Either escape the double quotes ("<bean:write name=\"globals\"
> property=\"minChars\" />" ) or use single quotes ("<bean:write
> name='globals' property='minChars' />" ).
>
>  --- Frank Maritato <[EMAIL PROTECTED]> escribi�: > Hi,
> >
> > What I want to do is something like this:
> >
> > <bean:message key="error.minCharacters"
> >   arg0="<bean:write name="globals" property="minChars" />" />
> >
> > or
> >
> > <bean:message key="error.minCharacters"
> >   arg0="<%=minChars%>" />
> >
> > Where arg0 is the result of a bean property, but I can't seem to get it
> > to work. If I hard-code the value
> >
> > <bean:message key="error.minCharacters" arg0="20" />
> >
> > It works, but it kinda defeats the purpose.
> >
> > What am I doing wrong, or is there a better way to accomplish this?
> >
> > Thanks
> > --
> > Frank
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _________________________________________________________
> Do You Yahoo!?
> Informaci�n de Estados Unidos y Am�rica Latina, en Yahoo! Noticias.
> Vis�tanos en http://noticias.espanol.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to