HTTP Status 404 - There is no Action mapped for namespace / and action name Login.
type Status reportmessage There is no Action mapped for namespace / and action name Login.description The requested resource (There is no Action mapped for namespace / and action name Login.) is not available.
--------------------------------------------------------------------------------Apache Tomcat/6.0.20

解决方案 »

  1.   

    <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd"><struts>
      <package name="example" namespace="/" extends="struts-default">
         <action name="Login" class="action.LoginAction">
          <result>/Resutl.jsp</result>
          <result name="input">/login.jsp</result>
         </action>
        </package>
    </struts>
    这是 struts.xml
    这是 login.jsp
    <%@ page language="java" contentType="text/html; charset=GB2312"
        pageEncoding="GB2312"%>
        <%@ taglib prefix="s"  uri="/struts-tags"%>
        <% 
          String path=request.getContextPath();
        %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <title>登录系统</title>
    </head>
    <body><br><br><br><br>
    <div align="center">
    ${requestScope.message}
    <s:form action="Login" method="POST">
    <s:textfield name="userName" label="用户名"/>
     <s:password name="password" label="密码"/>
     <s:submit value="提交"/>
    </s:form>
    </div>
    </body>
    </html>
      

  2.   

    看张冰的视频 他上面struts.xml都是放src里面 我在Java Resources:src里面建struts.xml就自动到webContent下面了 ???上面原因有可能是这个么
      

  3.   

    struts.xml跟包放一起。。配置文件没错。
      

  4.   

    包在src下  可是struts.xml放不下去  书上说在src下建了struts.xml就会自动在build目录中生成struts.xml 即实际运行时Web应用的"WEB-INF/class"目录 
      

  5.   

    楼主在src下建一个struts.xml的文件,注意名字一定要一样。然后将struts的包加入到WEB-INF/lib目录下即可。
      

  6.   

    你action是放在一个包名为action的包下?
      

  7.   

    对 是放在一个action包下的
      

  8.   

    我也经常遇到这种情况,仔细的检查URL是不是正确,还有那个java程序也要仔细检查,都没问题了就关了tomcat,重新部署,再启动tomcat,多试试。
      

  9.   

    警告: No configuration found for the specified action: 'Login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
    2010-8-13 22:09:10 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
    警告: No configuration found for the specified action: 'Login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.这样的警告
      

  10.   

    <s:form action="Login" method="POST">
    改为< s:form action="/Login" method="POST">
    action 应该等于 namespace + acionName
      

  11.   

      就是要把struts.xml放到src目录下面。。不然就会找不到struts.xml。。所以就会报找不到action的错
      

  12.   

    我用的是eclipse 开发的  在Java Resources:src 下创建struts.xml 然后创建好的struts.xml就会自动跟Java Resources:src  在同一目录下 费解啊