What is the difference between ActionErrors and ActionMessages?
Answer:Action Errors(org.apache.struts.action.ActionErrors):
A class that encapsulates the error messages being reported by the validate() method of an ActionForm. Validation errors are either global to the entire ActionForm bean they are associated with, or they are specific to a particular bean property (and, therefore, a particular input field on the corresponding form).
Each individual error is described by an ActionMessage object, which contains a message key (to be looked up in an appropriate message resources database), and up to four placeholder arguments used for parametric substitution in the resulting message.
ActionMessage(org.apache.struts.action.ActionMessage):
An encapsulation of an individual message returned by the validate method of an ActionForm, consisting of a message key (to be used to look up message text in an appropriate message resources database) plus up to four placeholder objects that can be used for parametric replacement in the message text.
|
|