码迷,mamicode.com
首页 > 编程语言 > 详细

javax.el.PropertyNotFoundException: Property 'Email' not found···

时间:2018-05-23 19:01:14      阅读:387      评论:0      收藏:0      [点我收藏+]

标签:iss   getter   hang   lan   ssi   不能   accept   user   code   

1.有空格 

javax.el.PropertyNotFoundException: Property ‘name‘ not found on type java.lang.String

 

在jstl标签属性中的""中间不能有空格,真实死都不知道怎么死的。

原: <c:forEach items="${userlist} " var="user">

把"${userlist} "中间的空格去掉,改为:

<c:forEach items="${userlist}" var="user">就ok了。

2.命名规范问题 https://stackoverflow.com/questions/29075213/javax-el-propertynotfoundexception-property-emailaddress-not-found-on-type-co

意思是声明类中元素时,命名有个默认规范首字母必须小写,不小写编译也会通过,但是实际上比如Email就是email。

Is the getter for EmailAddress field called getEmailAddress()? It‘s probably an issue with upper/lower case field names. Generally, field names should start with lower case letter (so emailAddress instead of EmailAddress), it is a globally accepted convention and a lot of frameworks depend on it while using reflection.

While it may be a major refactoring for you, you should change your fields to be lowerCamelCase and in your particular case with the getter named getEmailAddress() it should work.

As a quick workaround, try changing the expression to <c:out value="${UsersPrimary.getEmailAddress()}"></c:out>.



javax.el.PropertyNotFoundException: Property 'Email' not found···

标签:iss   getter   hang   lan   ssi   不能   accept   user   code   

原文地址:https://www.cnblogs.com/Babylon/p/9078253.html

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