65. What is the Struts Validator Framework

Struts Framework provides the functionality to validate the form data.

It can be use to validate the data on the users browser as well as on the server side.

Struts Framework emits the java scripts and it can be used validate the form data on the client browser.

Server side validation of form can be accomplished by sub classing your From Bean with DynaValidatorForm class.

Following are the core components of this framework:

  1. Validators
  2. Configuration Files
  3. Resource Files/Bundles
  4. JSP Custom Tags
  5. Validator Form Classes

The Validator Framework uses two XML configuration files validator-rules.xml and validation.xml. The validator-rules.xml defines the standard validation routines, these are reusable and used in validation.xml. to define the form specific validations. The validation.xml defines the validations applied to a form bean.

The Validator framework was developed by David Winterfeldt as third-party add-on to Struts. Now the Validator framework is a part of Jakarta Commons project and it can be used with or without Struts. The Validator framework comes integrated with the Struts Framework and can be used without doing any extra settings.

Advertisements

3 Responses

  1. […] comes integrated with the Struts Framework and can be used without doing any extra settings. Add comment September 9th, […]

  2. where the validation-rules.xml is found???(means inside which folder of tomcat’s installation folder).

  3. where validator-rules.xml ffile is found(in which subfolder of tomcat’s installation folder)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: