struts2.1中的action设置了result且路径正确,就是报 No result defined for action xxx.xxx and result error

Debug的时候其实action方法可以进入 但是就是到result就报错,最后发现是缺少
namespace属性
增加namespace="/"即可
奇怪的是另一个项目中也是struts2.1但是没有定义namespace却没有报错

你可能感兴趣的:(struts2.1中的action设置了result且路径正确,就是报 No result defined for action xxx.xxx and result error)