El表达式在页面取值的时候报:javax.el.PropertyNotFoundException: Property '' not found on type
2016-11-03 00:00
405 查看
摘要: el ,jsp取值
今天在用el取值的时候报错,用${invoiceVo.GfNO } 后台报错,
javax.el.PropertyNotFoundException: Property 'GfNO ' not found on type InvoiceVo
实际上在InvoiceVo中定义有字段GfNO,而且生成了 get set 方法
但是取值的时候就是报错,于是我把首字母改为小写,后成功。
上网查后有人说:
el表达式在你获取对象时,自动把你的属性名转换成字符串,并把首字母大写,进行拼接("get"+属性名),然后通过反射的方式获取到get方法,返回属性值,你的属性名如果不符合规范,就没办法进行转换了。
但是还是有疑问,我首字母大写,用get拼接后还是大写,对应的实体类中也有啊。
就算自动找也应该是找的到的。
今天在用el取值的时候报错,用${invoiceVo.GfNO } 后台报错,
javax.el.PropertyNotFoundException: Property 'GfNO ' not found on type InvoiceVo
实际上在InvoiceVo中定义有字段GfNO,而且生成了 get set 方法
但是取值的时候就是报错,于是我把首字母改为小写,后成功。
上网查后有人说:
el表达式在你获取对象时,自动把你的属性名转换成字符串,并把首字母大写,进行拼接("get"+属性名),然后通过反射的方式获取到get方法,返回属性值,你的属性名如果不符合规范,就没办法进行转换了。
但是还是有疑问,我首字母大写,用get拼接后还是大写,对应的实体类中也有啊。
就算自动找也应该是找的到的。
相关文章推荐
- JSP页面使用EL表达式出现的问题:javax.el.PropertyNotFoundException: Property 'ID' not found on type java.lang.Str
- EL表达式问题:javax.el.PropertyNotFoundException: Property 'post' not readable on type java.lang.Boolean
- el表达式的一些小问题:javax.el.PropertyNotFoundException: Property 'Title' not found on type
- javax.el.PropertyNotFoundException: Property 'xxx' not found on type
- he.jasper.JasperException: javax.el.PropertyNotFoundException: Property '0' not found on type com.jy
- javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String
- 对与几种javax.el.PropertyNotFoundException: Property 'XXX' not found on type java.lang.String问题原因
- javax.el.PropertyNotFoundException: Property 'id' not found on type java.lang.String
- javax.el.PropertyNotFoundException: Property 'mainimagepath' not found on type java.lang.String
- jstl报错ye:javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String
- javax.el.PropertyNotFoundException: Property 'eyeSuggest' not readable on type org.smt.entity.Health
- javax.el.PropertyNotFoundException: Property 'Name' not found on type com.min.test.User
- 解决javax.el.PropertyNotFoundException: Property 'empId' not found on type java.lang.String
- javax.el.PropertyNotFoundException: Property 'fyear' not found on type
- 遇到错误javax.el.PropertyNotFoundException: Property 'start' not found on type java.lang.String
- javax.el.PropertyNotFoundException: Property 'emailaddress' not found on type ja
- Caused by: javax.el.PropertyNotFoundException: Property 'title' not found on type java.lang.String
- javax.el.PropertyNotFoundExceptionProperty "name" not found on type java.lang.String
- Caused by: javax.el.PropertyNotFoundException: Property 'title' not found on type java.lang.String
- javax.el.PropertyNotFoundException: Property 'title' not found on type java.lang.String