This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts: ActionMessage vs. Action Error

 
Jessica Doe
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read in one book that ActionError is being deprecated in favor of ActionMessage. Another book mentions nothing of this. Is it so? Should I convert my ActionErrors to ActionMessages?

Can you put an Action Error in ActionMessages? If so, how do you pull only errors or messages out?

Thanks,

Jess
 
Shankar Narayana
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read in one book that ActionError is being deprecated in favor of ActionMessage. Another book mentions nothing of this. Is it so? Should I convert my ActionErrors to ActionMessages?

Can you put an Action Error in ActionMessages? If so, how do you pull only errors or messages out?

Thanks,

Jess


Hi,

It is true that ActionError is being deprecated in favour of ActionMessage, unfortunately the validate method of ActionForm still returns the ActionError object, so to work around it what you can do is instead of putting the ActionErrors objects into ActionErrors, put the ActionMessage objects.



and to access this errors in the jsp page use this code



Cheers
 
Jessica Doe
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic