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

Conclusions

Using DynaBeans and the Validator framework, you can reduce or even eliminate the need to write an ActionForm. DynaForms enable you to define the properties of a form in the struts-config.xml file, rather than in the form bean itself. You then use generic get and set operations on the form, rather than explicitly defined accessors.

The Validator framework integrates Struts with the Commons Validator project. The validator enables you to define validation rules in XML files, and automatically run them against the form during submission. This eliminates the need for the validate method on the Form, and in combination with a DynaForm, it eliminates the need for a distinct class.

Because the framework doesn’t handle all types of validations, ...

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