Well, normally for a request attribute I'd just use
${requestScope.attributeName}, but you can't do this here since there
are periods in the attribute name.  I think you should be able to use:

${!empty requestScope['org.apache.struts.action.ERROR']} 

as your test, since requestScope is a Map object.

John

> -----Original Message-----
> From: Franz-Josef Herpers [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 15, 2005 6:33 AM
> To: Struts Users Mailing List
> Subject: Replace logic:messagesPresent with JSTL tags
> 
> Hi,
> 
> I'm using the the <html-el:messages> tag to print out 
> validation error messages. Now I want to replace the Struts 
> logic tags with JSTL tags. 
> Hence I wrote:
> 
> <c:if test="${org.apache.struts.action.ERROR != null}">
>   <ul>
>     <html-el:messages id="error" bundle="ERRORS_KEY">
>       <li>
>         <span style="color:red">
>           <c:out value="${error}" escapeXml="false"/>
>         </span>
>       </li>
>     </html-el:messages>
>   </ul>
> </c:if>
> 
> But error messages are not shown even if there is definitely 
> an request attribute with the name org.apache.struts.action.ERROR.
> And even more strange for me is the fact that it works if i 
> use scriptlets and do it this way:
> 
> <% if (request.getAttribute("org.apache.struts.action.ERROR") 
> != null) {%>
>   <ul>
>     <html-el:messages id="error" bundle="ERRORS_KEY">
>       <li>
>         <span style="color:red">
>           <c:out value="${error}" escapeXml="false"/>
>         </span>
>       </li>
>     </html-el:messages>
>   </ul>
> <%}%>
> 
> Thanks in advance for any hints to solve this little problem.
> 
> Regards
> Franz
> 

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

Reply via email to