zoukankan      html  css  js  c++  java
  • javax.el.PropertyNotFoundException: Property 'Email' not found···

    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>.



  • 相关阅读:
    基础DP(初级版)
    UVA-816.Abbott's Tevenge (BFS + 打印路径)
    1044: 数圈
    1049: 打牌
    1047: 小A的计算器
    1046: 最小的K个数
    1045: 愚人节的礼物
    1044: 数圈
    1043: 绩点计算
    1042: 小丑排序
  • 原文地址:https://www.cnblogs.com/Babylon/p/9078253.html
Copyright © 2011-2022 走看看