org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property [xxx] not readable on type [xxx]
由于javaBean中的属性是custFullName,所以在使用jsp的时候,通过el表达式获取属性的值<td>${m.CustFullName}</td>。但是加载页面的时候报【javax.el.PropertyNotFoundException: Property [custFullName] not readable on type [com.aiwei.tdjk.entity.SaleOrderHeader]】,最终通过对比svn的代码发现,应该使用<td>${m.custfullname}</td>,暂时不明白为什么会这样。查到如下结论:
EL表达式获取对象属性的原理是这样的:
以表达式${user.name}为例
EL表达式会根据name去User类里寻找这个name的get方法,此时会自动把name首字母大写并加上get前缀,一旦找到与之匹配的方法,El表达式就会认为这就是要访问的属性,并返回属性的值。
所以,想要通过EL表达式获取对象属性的值,那么这个属性就必须有与之对应的get方法。如果不写get/set方法,那EL表达式就拿不到值了。set方法是给后台设置值用的。当el表达式首字母大写,会判断第二个字母大小写,小写,抛异常;大写,则直接拼接get,形成getter方法
当el表达式首字母小写,会判断第二个字母大小写,大写,必须第一个字母大写;否则无法获取值
如果el首字母大写,至少第二个字母必须大写。
org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property [xxx] not readable on type [xxx]的更多相关文章
- javax.el.PropertyNotFoundException: Property [name] not readable on type
该错误为el表达式读取javaBean属性时报错. 如: {$user.name} 原因: javaBean Class访问权限不够 解决办法: 将javaBean Class设置为public即可 ...
- HTTP Status 500 - javax.el.PropertyNotFoundException: Property 'lkmId' not found on type cn.itcast.entity.LinkMan
报错 type Exception report message javax.el.PropertyNotFoundException: Property 'lkmId' not found on t ...
- javax.el.PropertyNotFoundException: Property 'imgUrl' not found on type java.lang.String
严重: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Property ' ...
- javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String
javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String javax.el.Bean ...
- javax.el.PropertyNotFoundException:Property 'statisDate' not found on type java.lang.String
1.错误描述 javax.el.PropertyNotFoundException:Property 'statisDate' not found on type java.lang.String 2 ...
- JSP页面使用EL表达式出现的问题:javax.el.PropertyNotFoundException: Property 'ID' not found on type java.lang.Str
问题描述: 1. 后台返回到JSP前台的的list,在jsp页面使用EL表达式遍历时出现如下问题:javax.el.PropertyNotFoundException: Property 'ID' n ...
- Caused by: javax.el.PropertyNotFoundException: Property 'title' not found on type java.lang.String
问题:在JSP页面显示从后台传过来的list集合数据报错. 错误信息: Caused by: javax.el.PropertyNotFoundException: Property 'title' ...
- EL bug 之 javax.el.PropertyNotFoundException: Property 'Sub_Token' not found on type com.sunmo.stPhone.bean.User
javax.el.PropertyNotFoundException: Property 'Sub_Token' not found on type com.sunmo.stPhone.bean.Us ...
- Caused by: javax.el.PropertyNotFoundException: Property 'product' not found on type java.lang.String
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”,经过debug和打印将问题定位到这段代码: HTML应该是没啥问题,看提示在ja ...
随机推荐
- 菜鸟运维笔记:安装与配置Apacheserver
前几天在在阿里花了49.5买了一个月的主机. 试着好用再续费吧. 地域:青岛 可用区:青岛可用区A CPU:1核 内存:512MB 带宽:1Mbps 操作系统:CentOS 6.5 64位 云盾:是 ...
- MyEclipse 8.5安装Aptana
Aptana简单介绍 Aptana是一个很强大,开源,专注于JavaScript的Ajax开发IDE它的特性包含: 1.JavaScript,JavaScript函数,HTML,CSS语言的Co ...
- RHEL6.5上Oracle ACFS与Linux samba一起使用时遇到的bug
RHEL上的Oracle ACFS与linux samba一起使用时遇到的bug 一.环境介绍: cat /etc/issue的结果为: Red Hat Enterprise Linux Server ...
- Android API Guides –System Permissions
系统权限 声明: 本文由Gordon翻译 公布于www.dlvoice.com 欢迎转载,但请保留此声明 原文地址:http://developer.android.com/guide/topics/ ...
- C Language Study - gets , getchar & scanf
慢慢的发现C语言功底是如此的薄弱,被这几个字符输入函数搞糊涂了又~~ 来,再来忧伤一次吧~ 那么.我们从scanf開始: 假如说你要将一串字符输入到一字符数组里,例如以下面程序, char a[2]; ...
- [DLX反复覆盖] poj 1084 Square Destroyer
题意: n*n的矩形阵(n<=5),由2*n*(n+1)根火柴构成,那么当中会有非常多诸如边长为1,为2...为n的正方形,如今能够拿走一些火柴,那么就会有一些正方形被破坏掉. 求在已经拿走一些 ...
- ReSharper warns: “Static field in generic type”
http://stackoverflow.com/questions/9647641/resharper-warns-static-field-in-generic-type It's fine to ...
- iOS开发-多台机器共用证书问题
今天又被证书的问题卡壳了: 在公司的电脑上申请的开发.发布证书,回家用自己的电脑从苹果开发者中心上将证书和配置文件都下载下来提示用不了,弄了很久才想起.p12文件,必须从申请证书的电脑上导出,导入到自 ...
- expandableListview的默认箭头箭头怎样移到右边
1 . ExpandableListView布局:<ExpandableListView android:id="@+id/bbs_category_expandable_lis ...
- ZOJ3962 2017 E.Seven Segment Display
数码管从某个状态顺序转移N个状态 计算总共有多少个数码管被点亮 N<=10^9 观察数码管的变化规律,有明显的周期和重复,利用这个性质,计算相对于初始状态,某一位上的某个状态重复了多少次,就可以 ...