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
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
"-//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>
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.这样的警告
改为< s:form action="/Login" method="POST">
action 应该等于 namespace + acionName