Hi,

I couldn't get the following to work: (though trying as per the Struts API reference).

------------------- Doesn't work ------------
<html:messages id="message" property="specific">
<li>
<font color="red"> <bean:write name="message"/> </font>
</li>
</html:messages>
---------------------Doesn't work------------
I have the following code in Action class:
ActionErrors errors = new ActionErrors();
errors.add("specific", new ActionError("error.specific.req"));

and do have the mapping values for the "error.specific.req" in "ApplicationResource" 
file.

The ".jsp" doesn't display the error message added in the Action class, using the 
abobe code.

where as if use the generic property of "ActionErrors.GLOBAL_ERROR", (as shown below), 
the error is being displayed.
--------------------works--------------------
<html:messages id="message" property="<%= 
org.apache.struts.action.ActionErrors.GLOBAL_ERROR %>">
<li>
<font color="red"> <bean:write name="message"/> </font>
</li>
</html:messages>
--------------------works--------------------


Here i have added the error message to a property called "specific" and couldn't 
retrieve the same. (I have the proper working setup with the struts and using 1.13 
version). My purpose is to display the erros at required positios in the jsp.

please let me know, if i needed to go thru extra setup to get this working.

Thanks in Advance

Reply via email to