wood burning stoves*
The moose likes Struts and the fly likes ActionErrors vs ActionMessages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionErrors vs ActionMessages" Watch "ActionErrors vs ActionMessages" New topic
Author

ActionErrors vs ActionMessages

amit sanghai
Ranch Hand

Joined: Dec 05, 2000
Posts: 231
Hi,

I am not sure why ActionMessages are used when we can use ActionErrors. Can someone please help.

Thanks and regards,
Amit.
Adam Kreiss
Ranch Hand

Joined: Sep 12, 2005
Posts: 35
ActionErrors are used to display a single kind of message, an error message.

ActionMessages allow you to have other types of messages such as confirmation messages, completion messages, etc. in addition to the error messages.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you are using Struts 1.2, ActionErrors is deprcated and you should always use ActionMessages. If you are using Struts 1.1, use ActionMessages for informational messages and ActionErrors for error messages.


Merrill
Consultant, Sima Solutions
bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
Hello.

I'm working with a Struts 1.1 app...but it may be upgraded to 1.3 in the near future. In this case would it be wise to just use the ActionMessages all the time for future compatibility?

Thanks.


"...and the Truth will set you free."
 
 
subject: ActionErrors vs ActionMessages