struts2 validation.xml 校验成功但是出现404错误

if(hasErrors()) {return "input";}

原因是Action那里没有加这一段,出现错误时没有跳转页面

解决方法:补上上面代码,input对应的页面为提交表单的页面。

猜你喜欢

转载自blog.csdn.net/qq_42795049/article/details/88743528