Javax.el.PropertyNotFoundException:Property ' Email ' not found

Source: Internet
Author: User

1. There are spaces

Javax.el.PropertyNotFoundException:Property ' name ' not found on type java.lang.String

In the Jstl tag attribute "" In the middle cannot have the space, the true death does not know how to die.

Original: <c:foreach items= "${userlist}" var= "User" >

Remove the space in the middle of "${userlist}" and replace it with the following:

<c:foreach items= "${userlist}" var= "user" > OK.

2. Naming specification issues https://stackoverflow.com/questions/29075213/ Javax-el-propertynotfoundexception-property-emailaddress-not-found-on-type-co

This means that when declaring an element in a class, the name has a default specification first letter must be lowercase, not lowercase compilation will pass, but in fact, such as email is 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 ( emailAddress EmailAddress so instead of), it's a globally accepted Conventi On and a lot of frameworks depend on the it while using reflection.

While the It may is a major refactoring for you, you should the change your fields to being lowercamelcase and in your particular CAs E with the getters 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.