struts-config.xml中是否定义path="/logon"的映射

解决方案 »

  1.   

    struts-config.xml沒配置對應的 action.
      

  2.   

    struts-config.xml配置为:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!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="logonForm" 
          type="org.apache.struts.validator.DynaValidatorForm">
          <form-property name="username" type="java.lang.String"/>
          <form-property name="password" type="java.lang.String"/>
        </form-bean>
      </form-beans>  <global-forwards>
        <forward   name="success"              path="/main.jsp"/>
        <forward   name="logoff"               path="/logoff.do"/>
      </global-forwards>  <action-mappings>
        <action    path="/logon"
                   type="org.monotonous.struts.LogonAction"
                   name="logonForm"
                   scope="session"
                   input="/index.jsp">
        </action>    <action    path="/logoff"
                   type="org.monotonous.struts.LogoffAction">
          <forward name="success"              path="/index.jsp"/>
        </action>
      </action-mappings>  <controller>
        <!-- The "input" parameter on "action" elements is the name of a
             local or global "forward" rather than a module-relative path -->
        <set-property property="inputForward" value="true"/>
      </controller>  <message-resources parameter="org.monotonous.struts.ApplicationResources"/>
    </struts-config>请帮忙找出错误
      

  3.   

    action 实例没有被创建,看看你的包名是否正确
      

  4.   

    action 实例没有被创建,看看你的配置对不对???