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 ...
随机推荐
- zabbix学习系列之配置邮件告警
整体思路是:添加监控项-->配置触发器(达到设定的阈值就触发)-->配置动作(将某个触发器绑定到某个动作,达到某个阈值,触发器触发的时候,通过邮件发送告警信息给某个用户) 配置触发器 创建 ...
- VM虚拟机的网卡模式介绍
(1)Bridged方式 用这种方式,虚拟系统的IP可设置成与本机系统在同一网段,虚拟系统相当于网络内的一台.独立的机器,与本机共同插在一个Hub上,网络内其他机器可访问虚拟系统,虚拟系统也可访问网络 ...
- [AngularJS] ocLazyLoad -- Lazy loaded module should contain all the dependencies code
Recentlly works with AngularJS + ocLazyLoad, our project have break down into multi small modules. F ...
- 字符串处理(正则表达式、NSScanner扫描、CoreParse解析器)-b
搜索 在一个字符串中搜索子字符串 最灵活的方法 1 - (NSRange)rangeOfString:(NSString *)aString options:(NSStringCompareOptio ...
- HDU 1047 Integer Inquiry 大数相加 string解法
本题就是大数相加,题目都不用看了. 只是注意的就是HDU的肯爹输出,好几次presentation error了. 还有个特殊情况,就是会有空数据的输入case. #include <stdio ...
- 获取Linux磁盘分区的UUID
在设置fstab自动挂载时,需要填写如下的信息: # <file system> <mount point> <type> <options> < ...
- JSON入门指南
JSON 即 JavaScript Object Natation,它是一种轻量级的数据交换格式,很适合于server与 JavaScript 的交互.本文将高速解说 JSON 格式.并通过代码演示样 ...
- linux启动基本流程
linux启动序列 1.CPU初始化 CPU自身初始化.从某个固定位置(0xfffffff0)取指令并运行,该指令为跳转指令.跳转到BIOS代码的首部. 2.装载BIOS BIOS被固化在 ...
- Android 录音和摄像头权限适配【转】
本文转载自:http://blog.csdn.net/self_study/article/details/52965045 最近在研究权限适配的相关内容,整理以前的权限博客如下: android ...
- 转 Dos和linux格式转换(转)
错误提示: bad interpreter: No such file or directory: /bin/sh 错误分析: 因为操作系统是windows,在windows下编辑的脚本,所以有可能有 ...