java - ajax请求后台Unexpected Exception caught setting 'pAnswer.paper_id'
怪我咯
怪我咯 2017-04-18 10:17:07
0
1
513

1.ajax请求后台,post提交,数据格式如下

2.后台输出pAnawer;
报错:
1481902 ERROR [2016-11-03 10:51:44] Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'pAnswer.paper_id' on 'class com.pdcss.dbzx.weixin.cp.action.SurveyAction: Error setting expression 'pAnswer.paper_id' with value '[Ljava.lang.String;@4bd2efb0'

pAnswer对象应该是接受了(set方法是有的),pAnswer对象中的paper_id是int,难道是过来的paper_id是字符串的原因
可是我表单提交
<input name="pAnswer.paper_id"/>
后台是能接受到pAnswer的,为什么ajax提交就会报错!

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
PHPzhong

PAnswer cannot be used for variables. I found that a lowercase letter followed by an uppercase letter named a variable always caused problems. It may be related to the generation of get and set methods.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template