You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by as...@polaris.co.in on 2003/07/01 10:03:38 UTC

bean:message tag

hi,
I am trying to print the message as follows using bean tag lib.

<bean:message  name="logonform" />

Where logonform is  the name of the bean in request scope.

Here is what  the javadoc says about the name attribute:

name :Specifies the attribute name of the bean whose property is accessed
to retrieve the value specified by property (if specified). If property is
not specified, the value of this bean itself will be used as the message
resource key

But i get the error that "Property for message key must be a String"

Am i missing something ?

TIA
Ashwani


RE: bean:message tag

Posted by Filip Polsakiewicz <Fi...@innoface.de>.
Hi,

bean:message works only with PropertyResourceBundles. Those are specified by
name if you don't use the default ones. If you want to print the property of
your Form use <bean:write name="logonForm" property="username"/> instead.
HTH
Filip

> -----Original Message-----
> From: ashwani.kalra@polaris.co.in [mailto:ashwani.kalra@polaris.co.in]
> Sent: Tuesday, July 01, 2003 10:04 AM
> To: Struts Users Mailing List
> Subject: bean:message tag
>
>
>
> hi,
> I am trying to print the message as follows using bean tag lib.
>
> <bean:message  name="logonform" />
>
> Where logonform is  the name of the bean in request scope.
>
> Here is what  the javadoc says about the name attribute:
>
> name :Specifies the attribute name of the bean whose property is accessed
> to retrieve the value specified by property (if specified). If property is
> not specified, the value of this bean itself will be used as the message
> resource key
>
> But i get the error that "Property for message key must be a String"
>
> Am i missing something ?
>
> TIA
> Ashwani
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org