当前位置: 代码迷 >> Java Web开发 >> struts菜鸟, !
  详细解决方案

struts菜鸟, !

热度:215   发布时间:2016-04-17 10:51:01.0
struts初学者, 求助!!!
报错:Cannot retrieve definition for form bean: "loginForm" on action: "login.do"

login.jsp文件:
 <html:form method="POST" action="login.do">
  登录窗口<br>用户名
  <html:text property="username" name="username"></html:text>
  <br>密码 <html:password redisplay="true" property="password" name="password"></html:password>
  <br><html:submit value="登录" property="submit">
  </html:submit>
  <a href="register.jsp"></a>
  </html:form>

struts-config.xml文件:
 <form-beans >
  <form-bean name="loginForm" type="com.yourcompany.struts.forms.LoginForm"></form-bean>
  </form-beans>
  <action-mappings >
<action path="/index" forward="/login.jsp"/>
  <action
  input="/login.jsp"
  name="loginForm"
  path="/login"
  scope="request"
  type="com.yourcompany.struts.actions.LoginAction"
  >
<forward name="success" path="/welcome.jsp"/>
<forward name="failure" path="/login.jsp"/>
</action>
  </action-mappings>

------解决方案--------------------

------解决方案--------------------
  相关解决方案