One thing you could do is set your messages as attributes of your ActionForm, then display them from there with <bean:message> tags.
That feels to me like circumventing something in Struts though, so let's see if anyone else replies with a better answer...
Frank
From: "Ciaran Hanley" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Subject: RE: Application Resources Question Date: Thu, 10 Jun 2004 15:10:04 +0100
Thanks for your reply.
I'm using struts 1.1. I'm retrieving the values through an action class. The
option value is passed from a jsp and the class looks up the corresponding
resource.
For example somePage.jsp?q=info will look up the help.info resource in the ActionClass
ActionMessages messages = new ActionMessages(); String helpOutput = "help." + option; messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(helpOutput)); saveMessages(request,messages);
Can it be done this way so that the html is in the properties file still works when displayed on the resulting jsp?
Thanks
-----Original Message----- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: 10 June 2004 14:52 To: [EMAIL PROTECTED] Subject: RE: Application Resources Question
I just tried this, and the <br> get rendered properly and I get linebreaks.
What version of Struts are you using? What code is in your JSP to display the message resource?
>From: "Ciaran Hanley" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts User Mailing List" <[EMAIL PROTECTED]>
>Subject: Application Resources Question
>Date: Thu, 10 Jun 2004 14:32:58 +0100
>
>Hi,
>
>
>
>I am trying to format some text so that it appears on separate lines so I
>am
>using the <br> tag in my ApplicationResources.properties file.
>
>
>
>help.info = First sentence of help. <br> Second sentence <br> Third etc...
>
>
>
>The <br> tag is coming out as text on the page and in the source it is
>translated as <br>
>
>
>
>Is there a way to get around this without breaking the string into a number
>of sentences?
>
>
>
>Thanks,
>
>CH
>
>
>
>
>
_________________________________________________________________ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.click-url.com/go/onm00200362ave/direct/01/
--------------------------------------------------------------------- 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]
_________________________________________________________________
Looking to buy a house? Get informed with the Home Buying Guide from MSN House & Home. http://coldwellbanker.msn.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]