错误:
11:44:40,640 ERROR Dispatcher:515 - Could not find action or result
No result defined for action www.account.people.struts.TestAction and result input - action - file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/account/WEB-INF/classes/config/struts/people/people-struts.xml:23:56
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) ....
代码如下:
jsp代码:
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
Action代码:
public class TestAction extends BaseAction {
private Date timee;
private String str;
private String times;
public String toGo(){
System.out.println(times);
return super.SUCCESS;
}
public String getStr() {
return str;
}
public void setStr(String str) {
this.str = str;
}
public Date getTimee() {
return timee;
}
public void setTimee(Date timee) {
this.timee = timee;
}
public String getTimes() {
return times;
}
public void setTimes(String times) {
this.times = times;
}
}
struts2配置文件:
补充:
1.我后来把jsp使用struts2的标签重新写了一边,日期也使用了struts2的日期控件,提交后还是报同样的错误。。
2.按网上的一些说法我也添加了Date类型转换类,xwork-conversion.properties配置也加上了,还是同样的错误。。