Struts2:No result defined for action com.yibai.user.action.LoginAction and result input

转自:https://zhidao.baidu.com/question/133574016.html
1
String 里面有5个static 常量分别是: 2 ERROR INPUT LOGIN NONE SUCCESS 3 例如 如果在excute 中返回的是 ruturn SUCCESS; 4 也就相当于返回的是return "success"字符串 5 就必须在struts.xml中写上对应的"success" 6 <result name="success">/x.jsp</result> 7 8 当然EORROR 对应的就是"error";字符串 9 当然INPUT 对应的就是"input";字符串 10 当然LOGIN 对应的就是"login";字符串 11 当然NONE 对应的就是"none";字符串 12 13 要不你就换一换把return INPUT换成return "input";试一试 14 一定要确定你在excute返回的字符串在 struts.xml中有定义 15 16 还有一个要提醒你的就是: 17 在validate中验证有错误的话且没有指定return 字符串的话, 18 struts2默认就返回的是 return INPUT 也就是return "input"
原文地址:https://www.cnblogs.com/sharpest/p/5577562.html