码迷,mamicode.com
首页 > 其他好文 > 详细

struts Domian传递参数问题

时间:2015-08-04 11:01:13      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:

Error setting expression ‘user.name‘ with value ‘[Ljava.lang.String;@f18d37‘


ognl.NoSuchPropertyException: com.lp.User.name [java.lang.IllegalAccessException: Class ognl.OgnlRuntime can not access a member of class com.lp.User with modifiers ""]


at ognl.OgnlRuntime.setFieldValue(OgnlRuntime.java:1663)

造成这种错误,因为model层的属性不是public类型的,如下:

 

 

   public class User {
         String name;

    }

 

 

更改过后就没有问题了

struts Domian传递参数问题

标签:

原文地址:http://www.cnblogs.com/nongmei/p/4701239.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!