Please send your Questions & Answers or Feedback to ""

How client side validation is enabled on a JSP form?

In order to enable client side validation in Struts, first we need to enable validator plug-in in struts-config.xml file. This is done by adding following configuration entries in this file:


<!–  Validator plugin –>

<plug-in className=”org.apache.struts.validator.ValidatorPlugIn”>






Then Validation rules are defined in validation.xml file. If a form contains email field and we want to enable client side validation for this field, following code is added in validation.xml file:


<form name=”testForm”>

<field  property=”email”


<arg key=””/>




Related Posts Plugin for WordPress, Blogger...
Flag Counter