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

The Validator: Automating Field Checking

Using DynaBeans has enabled you to drastically reduce the size of the form bean, but wouldn’t it be nice to get rid of it all together?

After moving all the properties out of the bean and into the DynaForm definition in struts-config.xml, the only thing left in the bean is the validate function. By using the Struts Validation framework, which ties into the Commons Validator package, you can remove this last piece of code and get rid of the form bean.

WHAT IS COMMONS?

Commons (or more formally, the Jakarta Commons project) is an effort to gather a lot of reusable Java code in one place.

The idea is that there are any number of commonly coded tasks that can be generalized and placed in one place, so ...

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