[펌글] javax.servlet.ServletException: No form found under ‘UserLoginForm’ in locale ‘en_US’ … 류의 에러

By | 2월 11, 2010

- 출처 : http://vchaithanya.wordpress.com/2007/12/22/javaxservletservletexception-no-form-found-under-userloginform-in-locale-en_us/ -

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 계열의 파일에 폼이 정의되어 있지 않아서 에러를 냈었다.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments