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

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

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

时间: 2024-10-24 04:35:41

javax.el.PropertyNotFoundException: Property 'Email' not found···的相关文章

[java] javax.el.PropertyNotFoundException: Property &#39;id&#39; not found on type bean.Student

问题提出: 在使用MyEclipse开发Java Web时,调用DAO和Java Bean出现了如下错误: 严重: Servlet.service() for servlet [jsp] in context with path [/JDBCbyDao] threw exception [An exception occurred processing JSP page /student.jsp at line 37 34: 35: <c:forEach items="${ student

javax.el.PropertyNotFoundException: Property &#39;id&#39; not found on type java.lang.Integer

javax.el.PropertyNotFoundException: Property 'id' not found on type java.lang.Integer    at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:237)    at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:214)    at jav

javax.el.PropertyNotFoundException: Property &#39;name&#39; not found on type java.lang.String

javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) javax.el.BeanELResolver.property(BeanELResolver.java:267) javax.el.BeanELResolver.getValue(Bean

Caused by: javax.el.PropertyNotFoundException: Property &#39;product&#39; not found on type java.lang.String

今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”,经过debug和打印将问题定位到这段代码: HTML应该是没啥问题,看提示在java.lang.string类型上找不到属性“product”,应该是EL表达式哪里写错了,然后将图中EL表达式重新写了一遍: 然后神奇的不报错了,搞得我一脸蒙蔽,我将每段代码都比对了一下,没发现哪里不对,干就干彻底,替换每段代码测试,结果第一段替换进去就OK了 仔细检查了两段代码: //报错代码 <c

Caused by: javax.el.PropertyNotFoundException: Property [userName] not found on type [java.lang.String]

Caused by: javax.el.PropertyNotFoundException: Property [userName] not found on type [java.lang.String] at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:260) at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:21

javax.el.PropertyNotFoundException:

javax.el.PropertyNotFoundException: Property 'ContextPath' not found on type org.apache.catalina.core.ApplicationHttpRequest 在javabeans命名规范中不允许第一个字母大写第二个字母小写,建议方法改写成小写字母开头

javax.el.PropertyNotFoundException: &#39;newsLine&#39; is an unknown bean property...

用了好久的forEach标签,今天帮同事调试程序看到以下异常,第一感觉应该是javabean里面的属性和页面的属性不一致导致,反复检查,确认属性没任何问题,没办法,实在看不出来,只好自己写一个forEach,同一个list,同一个属性,没报任何异常,然后比较发现,报错程序里items="${getTestModule}"在$符号前加了个空格,问题就这么解决了,顿时无语中... [show] javax.el.PropertyNotFoundException: 'newsLine' i

javax.el.PropertyNotFoundException错误

在J2EE项目的开发过程中,遇到了这个问题,报错如下: 错误原因为在我model里的Person类里定义了一个Name属性,但是读取属性的getter方法的,一般按照属性首字母小写来处理,所以把Name改成name就行了.

处理 javax.el.ELException: Failed to parse the expression 报错

在JSP的表达式语言中,使用了  <h3>是否新Session:${pageContext.session.new}</h3>  输出Session是否是新的,此时遇到了  javax.el.ELException: Failed to parse the expression  报错.这里主要是因为在Tomcat7中表达式的权限变小了,如果遇到JAVA的关键字,就会出现此种错误,在这个例子中就是因为 new 是JAVA的关键字,所以才会出错. 解决办法:设置启动参数   -Dor