Hi,

I used HTML code to customize the way errors are displayed
e.g.:
errors.header=<ul><font color="red">Error</font>
error.username.required=<li>Please enter your username</li>
error.password.required=<li>Please enter your password</li>
error.login.invalid=<li>Invalid login</li>
error.noValues.invalid=<li>You didn't enter any value !</li>
errors.footer=</ul>

and everything worked fine.

The way I call for errors in the jsp is :
<html:errors/>

I also used:
<bean:message key="someAction.updatefailed"/> for displaying a message from
Application.properties where the message contained HTML tags:
someAction.updatefailed=Update failed ! <br>You don't have the proper
permissions !
and everything worked fine.

HTH,
Cezar

-----Original Message-----
From: Mikael Eriksson - Swedish Connection [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 4:53 PM
To: Struts Users Mailing List
Subject: Re: html in ActionMessage resource keys?



Hi!

Try to do the bean:write like this

    <bean:write filter="false" name="msg" />

The filter="false" tells it to not replace special characters to entities.

Regards
Mikael


At 17:04 2003-08-25 -0400, you wrote:
>Hi,
>
>I am wondering if html tags, such as <br>, be used in the message
>resource bundle keys? I want to have some formatting for an
>ActionMessage, similar to what one gets using the ActionErrors and the
>errors.prefix, errors.header and errors.footer keys (by default = <BR>,
><UL>, </UL> respectively).
>
>When I create a message key in my resource bundle, such as
>messages.warning.general=Warning,the following problem occurred <BR> {0}
>
>and use the following type of tag to display the message:
>          <html:messages message ="true" property="warning" id="msg">
>                <li><bean:write name="msg"/>
>          </html:messages>
>
>
>I get the following in the html source:
><li>Warning,the following problem occurred:&lt;BR&gt; access problem
>
>What I want is the following:
><li>Warning,the following problem occurred:<BR> access problem
>
>Thanks,
>Nancy
>
>
>---------------------------------------------------------------------
>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]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


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

Reply via email to