Use <c:out value="${error}" escapeXml="false"/>

robert
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 17, 2004 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: Links within ActionErrors
> 
> 
> I know this probably violates some basic guidlines but...
> I am trying to display an html link rendered by the message in the
> ActionErrors section of a JSP.
> My problem is that the '<' and '>' symbols are being replaced by '& l t;'
> and '& # 034;'  (their equivelent)
> How can I prevent this translation from happening?
> 
> Example:
> In the applicationresources file we have something like the following:
>       error.save.dup.link=<a href="{0}">click for details</a>
> The action class creates the actual link address and adds an actionError as
> follows:
>       tActionErrors.add(ActionErrors.GLOBAL_ERROR,
>               new ActionError("error.save.dup.link", 
>       
> iRequest.getRequestURL().substring(0,iRequest.getRequestURL().lastIndexOf("/
> ")) +
>               "/blah blah blah" ));
>         saveErrors(iRequest, tActionErrors);
> 
> In the JSP we have tags to dislay the errors:
>       <logic:messagesPresent>
>         <table><tr><td>
>               <b><span id="errorsHeader"><bean:message
> key="errors.validation.header"/></span></b>
>               <html:messages id="error">
>                 <c:out value="${error}"/>
>               </html:messages>
>         </td></tr></table>
>       </logic:messagesPresent>
>       
> When the error is displayed because the '<' and '>' signs have been replaced
> it just show the text as follows:
>       <a href="http://localhost:8080/blah blah blah"> click to see </a>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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