Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActionErrors vs ActionMessages

 
amit sanghai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic