Hi everyone,
I am trying to do validations using the
struts framework.
In Form :
I extend my form with the ValidatorActionForm of org.apache.struts.validator.ValidatorActionForm
Then I put a validate () method in the form.
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
ActionErrors errors = super.validate(mapping, request);
return errors;
}
In
JSP :
for the <html:text.... >
<html:errors property="bean.name" name="form"/>
I put entries for the validation.xml and validator-rules.xml in the struts-config.xml.
Also in struts define the application.properties file.
In the struts-config.xml
the 1st mapping to this page i say validate="false" but for the next mapping i say validate="true"
SO when the 1st URL is typed in the browser address bar i get this ServletException :
Cannot process ActionErrors instance of class
CAn anyone please tell me what the problem is ?
Thanks,
Gayatri