Monday, February 18, 2008

Compare ActionErrors and ActionMessages

What is the difference between ActionErrors and ActionMessages

ActionMessages is the super class of ActionErrors.

n struts 1.0 to dispaly the errors, ActionError was used but struts1.1 that feature depricated by ActionMessage tag.

it will be generated like

main advantage of ActionMmessage tag is it does not force to write html tags in properties file .but ActionError object forces to write html tags.


Action Message :
Encapsulate the collection of message,these message are global, each message specified the particular bean property, these contain the key, which refers the resource bundle in database.

Action Error :Â This is a return type of the validate(),contain the collection of error messages, these message are reported by the validate() of the Action form
these message are global and represent the particular bean property,


No comments: