O'Reilly logo

Struts Kick Start by Kevin Bedell, James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data Validation and ActionErrors

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required