File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:messages vs html:errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:messages vs html:errors" Watch "html:messages vs html:errors" New topic

html:messages vs html:errors

wrushasen dakhane
Ranch Hand

Joined: Sep 25, 2006
Posts: 47

Here I am trying to understand the difference between html:messages and html:errors.

As both of them displays the ActionMessages and ActionErrors object which have been added to the request in the Business login section.

Can anybody explains the exact difference?


SCJP 1.4, SCWCD 1.4
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
ActionErrors have been deprecated in previous releases and are currently removed from the latest version of Struts (1.3.8).

ActionMessages is what should be used.
[ May 23, 2007: Message edited by: Dom Lassy ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just to clarify: it is the ActionError class, not the ActionErrors class that has been deprecated. The ActionErrors class is still listed in the javadoc, and it is still included in the struts jar file.

However, I belive your question is about the <hml:errors> as opposed to the <html:messages> tags. Neither of these tags has been deprectated, and both can be used.

If you'll read the secions entitled "Displaying Messages" and "Displaying Error Messages" in this link you will find a good explanation of the differences, along with some examples of each.
[ May 23, 2007: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link:
subject: html:messages vs html:errors
jQuery in Action, 3rd edition