Creating data validation logic is an important and time-consuming part of any application. Fortunately, Struts provides an easy-to-use, powerful way of handling this for you.
This functionality is broken into two pieces:
Providing an easy-to-use method of capturing error information as it is discovered
Making that information available to the View component in a manner that makes it easy for the View component to access and display the information as needed
The Struts framework provides two classes to assist you with this:
ActionError— This class is used to represent a single validation error.
ActionErrors— This class provides a place to store all the individual ActionError objects you create. As you create ...