Thanks all.

I found the problem.
Actually, the tag <html:errors /> can display any ActionError found. But I 
confused my ApplicationResources.properties file, that is, the error I want to 
display was not defined in that file. So it will never be displayed until being 
defined.

Further more, I don't need to know the actual value of 
ActionErrors.GLOBAL_ERROR. Because I can just use it also in my jsp file. To do 
this, just add a line with <jsp:directive.page 
import="org.apache.struts.action.ActionErrors"/> in the header of the jsp file. 
Then I can use the expression <%=ActionErrors.GLOBAL_ERROR %> to get the value 
of ActionErrors.GLOBAL_ERROR.

I knew this is simple but I'm new to both JSP and STRUTS.

Talos


----- Original Message ----- 
From: "Lukasz Lenart" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Wednesday, March 19, 2008 3:16 PM
Subject: Re: About ActionErrors.GLOBAL_ERROR


Hi,

Maybe something like this:

<logic:messagesPresent name="<%=Globals.ERROR_KEY%>">
<table width="480" id="ErrorsTableId" class="ErrorsTable">
<html:messages id="error" name="<%=Globals.ERROR_KEY%>">
  <tr>
    <td><bean:write name="error" /></td>
  </tr>
</html:messages>
</table>
</logic:messagesPresent>

<logic:messagesPresent name="<%=Globals.MESSAGE_KEY%>">
<table width="480" id="MessagesTableId" class="MessagesTable">
<html:messages id="message" message="true">
  <tr>
    <td><bean:write name="message" /></td>
  </tr>
</html:messages>
</table>
</logic:messagesPresent>

<logic:present name="<%=Globals.EXCEPTION_KEY%>">
<table width="480" id="ExceptionTableId" style="display: none"
class="ExceptionTable">
  <html:messages id="exception" name="<%=Globals.EXCEPTION_KEY%>">
  <tr>
    <td>
      <bean:write name="exception" />
    </td>
  </tr>
  </html:messages>
</table>
</logic:present>


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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

Reply via email to