This is the exception thrown when i try to perform client-side validations using dynavalidatorform in struts:
solution: check for the form name in the following files, this is where the problem occurs most of the times. Even is we add ‘/’ to the formname somewhere it throws the above exception.
1) In Jsp file
<html:form action=”/UserLoginAction” onsubmit=”return validateUserLoginForm(this)”>
<html:javascript formName=”UserLoginForm“/> It looks for the form name in the below file.
3) In validation.xml file
<form name=”UserLoginForm“>
……..
</form>
4) In struts-config.xml file
<form-bean name=”UserLoginForm” type=”org.apache.struts.validator.DynaValidatorForm”>
……………………..
</form-bean>
<action input=”/userlogin.jsp” name=”UserLoginForm” path=”/UserLoginAction”
scope=”request” type=”com.myapp.struts.UserLoginAction” validate=”true”>
<forward name=”success” path=”/userloginsuccess.jsp”/>
</action>
나의 경우는 validation.xml 계열의 파일에 폼이 정의되어 있지 않아서 에러를 냈었다.