struts2错误信息HTTP Status 404 - No result defined for action

default.jsp:
[code="java"] <%
String url = request.getContextPath()+"/LoginIndex.action";
response.sendRedirect(url);
%>[/code]

struts.xml:
[code="java"]


/index.jsp

[/code]

Spring:
[code="java"][/code]

Action:
[code="java"]package com.zjm.ssh2.login.web.action
public class LoginAction extends ActionSupport {
public String loginIndex() {
System.out.println("index action");//此句没打印,流程没进入这个方法
return SUCCESS;
}
}[/code]

[b]错误信息[/b]:
HTTP Status 404 - No result defined for action com.zjm.ssh2.login.web.action.LoginAction and result input


type Status report

message No result defined for action com.zjm.ssh2.login.web.action.LoginAction and result input

description The requested resource (No result defined for action com.zjm.ssh2.login.web.action.LoginAction and result input) is not available.

[quote]多谢了,是验证文件直接写成LoginAction-validation.xml,验证所有了,改成LoginAction-login-validation.xml就好了
在请问一下,我现在因为调试,想暂时禁用验证,怎么配置 [/quote]

在class目录下暂时不要放类似LoginAction-login-validation.xml的校验文件就行了。

[quote]HTTP Status 404 - No result defined for action com.zjm.ssh2.login.web.action.LoginAction and result input [/quote]

从这个错误可以看出,请求是找到了LoginAction的,不过返回的字符串是“input”,你在struts.xml中没有为action配置
...jsp
所以返回上面的错误。

原因很可能是访问LoginIndex.action时validation没有通过,查看一下你配置的validate xml文件。