Struts2 ognl.NoSuchPropertyException

Struts2 2.1.6

@Result(name = "workflowconf", location = "workflowconf.action", type = "redirect", params = {"id", "%{id}" })

即使你在workflowconf.action里面加了SetId();还是会报出异常:
Caused by: ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletRedirectResult.id
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:393)

Struts2的BUG
Struts2.1.8已经修复
所以,升级

你可能感兴趣的:(备忘,JAVA)