3
回答
我在取一个值的时候,在jsp页面上取到的是month ,action说是string类型
开发十年,就只剩下这套Java开发体系了   

然后就是报204,报ognl错误,页面上取用户输入条件的时候,怎么就直接转换int类型,免得在action中就报类型错误,,重启了几次Tomcat,我用的是SSH框架,,,


从页面传month为600, 从页面传进来的时候报错了 

com.opensymphony.xwork2.ognl.OgnlValueStack - Error setting expression 'month' with value '[Ljava.lang.String;@16cfb35'
ognl.MethodFailedException: Method "setMonth" failed for object com.netvour.business.user.view.UserAction@1f28e63 [java.lang.NoSuchMethodException: com.netvour.business.user.view.UserAction.setMonth([Ljava.lang.String;)]
	at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1305)
	at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1494)
	at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
	at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2332)
	at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:78)
	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2332)
	at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
	at ognl.SimpleNode.setValue(SimpleNode.java:301)
	at ognl.Ognl.setValue(Ognl.java:737)
	at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:234)
	at com.opensymphony.xwork2.ognl.OgnlValu


<无标签>
举报
天池番薯
发帖于4年前 3回/211阅
顶部