This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:messages vs html:errors" Watch "html:messages vs html:errors" New topic
Author

html:messages vs html:errors

wrushasen dakhane
Ranch Hand

Joined: Sep 25, 2006
Posts: 47
Hello,

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?

Wrushu


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 ]

Merrill
Consultant, Sima Solutions
 
wood burning stoves
 
subject: html:messages vs html:errors
 
Similar Threads
Validator plugin messages with <html:messages> tag
JSP in Struts
Struts server side validation problem
difference between html:errors and html:messages
Handling Messages (v1.2.9)