File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to ActionErrors and ActionError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to ActionErrors and ActionError" Watch "How to ActionErrors and ActionError" New topic
Author

How to ActionErrors and ActionError

Gopnan
Greenhorn

Joined: Sep 13, 2007
Posts: 15
Hi Firends,
I am new to struts application. I don't know what is use ActionErrors and ActionError and how to use this Errors in our Struts application .Anybody help to me. Give a sample code for how to use this.
John Melton
Ranch Hand

Joined: Aug 17, 2004
Posts: 49
Hi,
ActionErrors is just a way to do validation and get errors onto the JSP page for display. For the most part now you can use ActionMessages instead of ActionErrors. Here's a simple example. From your action, write these lines:



In the ApplicationResources.properties file (your messages file), you'd have to put a message in for "my.error.something", or whatever you called your error, then on the jsp page, use thes lines



[url]www.jtmelton.com[/url]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Gopnan,

Please change the publicly displayed name on your profile so that it conforms to the JavaRanch Naming Policy.

Failure to do so may result in your profile being removed.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to ActionErrors and ActionError
 
Similar Threads
Accessing individual ActionErrors using EL
ActionError problem in Struts 2.0
Getting values from properties in validate-using multiple message-resources in struts
ValidatorForm exception in struts framework
saveErrors method in Action class