<html:form action="/user" method="post">struct-config.xml<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
<form-beans>
 <form-bean name="userForm" type="form.UserForm"/>
</form-beans>
<action-mappings>
 <action path="/user" type="action.UserAction" name="userForm" input="/index.jsp" validate="true" scope="session">
  <forward name="success" path="/hello.jsp"></forward>
   <forward name="failed" path="/error.jsp"></forward>
 </action>
<action-mappings>

解决方案 »

  1.   

    struct-config.xml<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
     <form-bean name="userForm" type="form.UserForm"/>
    </form-beans>
    <action-mappings>
     <action path="/user" type="action.UserAction" name="userForm" input="/index.jsp" validate="true" scope="session">
      <forward name="success" path="/hello.jsp"></forward>
       <forward name="failed" path="/error.jsp"></forward>
     </action>
    <action-mappings>
    </struts-config>
      

  2.   

    你的form.UserForm这个类存在吗?
      

  3.   

    form.UserForm存在,请帮我看一下web.xml文件,可能有问题
      

  4.   

    上面问题解决了,现在又出现新问题了
    No action instance for path /user could be created