HTTP Status 500 - No action instance for path /login could be created--------------------------------------------------------------------------------type Status reportmessage No action instance for path /login could be createddescription The server encountered an internal error (No action instance for path /login could be created) that prevented it from fulfilling this request.
--------------------------------------------------------------------------------Apache Tomcat/5.5.27
<struts-config> <form-beans>
<form-bean name="loginForm" type="com.bjsxt.struts.LoginActionForm"/>
</form-beans>

<action-mappings>
<action path="/login"
type="com.bjsxt.struts.LoginAction"
name="loginForm"
scope="request"
>
<forward name="success" path="/login_success.jsp"/>
<forward name="error" path="/login_error.jsp"/>
</action>
</action-mappings>
</struts-config>
<body>
<h1>用户登录</h1>
<hr>
<form action="login.do" method="post">
用户:<input type="text" name="username"><br>
密码:<input type="password" name="password"><br>
<input type="submit" value="登录">
</form>
</body>

解决方案 »

  1.   

    你的<form action="login.do" method="post">
    这个action属性里面的路径不对吧
      

  2.   

    <form action="login.do" method="post">
    action里面的好像不用写.do了吧
      

  3.   

    你在com.bjsxt.struts这个类中定义了LoginAction没有啊
      

  4.   


    <from action="/login" method="post">
    //other
    </form>
      

  5.   

    form提交表单的action给为action="/login" ,这个action的值要与配置文件中的path的值一致
      

  6.   

    500错误,看下是不是web-xml写错了,还是*.Java写错了
      

  7.   

    一看就是配置的問題
    可參考以下配置:<action
          attribute="StudentForm"
          name="StudentForm"
          parameter="method"
          path="/student"
          scope="request"
          type="org.springframework.web.struts.DelegatingActionProxy">
          <forward name="editStudent" path="/editStudent.jsp"></forward>
          <forward name="addStudent" path="/addStudent.jsp"></forward>
        </action>jsp頁面:<form action="student.do">