struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul McCulloch <>
Subject RE: <bean:message key=<bean:write question
Date Tue, 29 Jul 2003 15:25:26 GMT
You could expose the actual message (rather than it's key) via your form -
getMyPropertyMessage(). To render this you'd just need:

<bean:write name="myForm" property="myPropertyMessage"/>


-----Original Message-----
From: Brian McSweeney []
Sent: 29 July 2003 16:17
To: 'Struts Users Mailing List';
Subject: RE: <bean:message key=<bean:write question

Hi David,
Thanks for the quick reply.

I know that JSTL might be the best way, but for the moment
I'd really prefer to just get it working with the struts tags 
first because it's an entire app using the struts tags.

If my proposed method isn't valid how about something like:

<bean:define id=localCopy name="myForm" property="myProperty"

<bean:message key="<%=localCopy%>"/>

Perhaps this would work?
I know it's a bit nasty, but I just want to get it working :-)

Thanks for your help

-----Original Message-----
From: David Graham [] 
Sent: 29 July 2003 16:04
To: Struts Users Mailing List
Subject: Re: <bean:message key=<bean:write question

--- Brian McSweeney <> wrote:
> Hi all,
> I have parameters in a form bean and I want to use it as 
> the key for an associated value in a resource bundle.
> I was considering using 
> <bean:message key=<bean:write name="myForm" property="myProperty">/>
> is this valid syntax?

No.  You can't use a tag as another tag's attribute value.  Have you
considered using the JSTL's <fmt:message> tag instead?


> Thanks,
> Brian

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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

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

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee
indicated in this message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to Internet email messages
of this kind, please advise us immediately. Opinions, conclusions and other information expressed
in this message are not given or endorsed by my Company or employer unless otherwise indicated
by an authorised representative independent of this message.
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via
electronic mail attachments we cannot guarantee that attachments do not contain computer virus
code.  You are therefore strongly advised to undertake anti virus checks prior to accessing
the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for loss or damage
howsoever caused.

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

View raw message