Set - 5

Question 6 :

Describe the details of XML files used in the "Validator Framework"?

Answer :

The Validator Framework uses two XML configuration files
1) validator-rules.xml and
2) 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.

Question 7 :

How would you display "validation fail" errors on a JSP page?

Answer :

Following tag displays all the errors:

Question 8 :

How can one enable front-end validation based on the xml in validation.xml?

Answer :


tag allows front-end validation based on the xml in validation.xml.
For example the code:
generates the client side JavaScript for the form "logonForm" as defined in the validation.xml file.
The when added in the JSP file generates the client side validation script.