type Status report
message There is no Action mapped for namespace / and action name input.
description The requested resource (There is no Action mapped for namespace / and action name input.) is not available.
这个问题不说了,本来已经运行出来的,我退出再登运行就是这个了。。。。有点郁闷。于是乎解决问题是必然的。
首先还是觉得有必要了解Struct默认的input方法:
String 里面有5个static 常量分别是:ERROR INPUT LOGIN NONE SUCCESS例如 如果在excute 中返回的是 ruturn SUCCESS;也就相当于返回的是return "success"字符串就必须在struts.xml中写上对应的"success"<result name="success">/x.jsp</result>当然EORROR 对应的就是"error";字符串当然INPUT 对应的就是"input";字符串当然LOGIN 对应的就是"login";字符串当然NONE 对应的就是"none";字符串要不你就换一换把return INPUT换成return "input";试一试一定要确定你在excute返回的字符串在 struts.xml中有定义还有一个要提醒你的就是: 在validate中验证有错误的话且没有指定return 字符串的话,struts2默认就返回的是 return INPUT 也就是return "input"。但是早就检查过了。没问题的。。
看看namespace没问题
看看都没问题
原来把struct。xml移了地方它应该放到WEB=INF下的class文件夹