由于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]的更多相关文章

  1. javax.el.PropertyNotFoundException: Property [name] not readable on type

    该错误为el表达式读取javaBean属性时报错. 如: {$user.name} 原因: javaBean Class访问权限不够 解决办法: 将javaBean Class设置为public即可 ...

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

  3. javax.el.PropertyNotFoundException: Property 'imgUrl' not found on type java.lang.String

    严重: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Property ' ...

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

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

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

  7. Caused by: javax.el.PropertyNotFoundException: Property 'title' not found on type java.lang.String

    问题:在JSP页面显示从后台传过来的list集合数据报错. 错误信息: Caused by: javax.el.PropertyNotFoundException: Property 'title' ...

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

  9. Caused by: javax.el.PropertyNotFoundException: Property 'product' not found on type java.lang.String

    今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”,经过debug和打印将问题定位到这段代码: HTML应该是没啥问题,看提示在ja ...

随机推荐

  1. Creating A Simple Web Server With Golang

    原文:https://tutorialedge.net/post/golang/creating-simple-web-server-with-golang/ -------------------- ...

  2. android中单元測试中的断言assert的使用与扩展

    首先看一组对照,比方说我们要測试的结果是一个Linearlaout AssertJ Android: assertThat(layout).isVisible() .isVertical() .has ...

  3. 用R进行微博分析的初步尝试

    新浪微博如火如荼,基于微博的各种应用也层出不穷. 有一种共识似乎是:微博数据蕴含着丰富的信息,加以适当的挖掘.可以实现众多商业应用.恰好社会网络分析也是我之前有所了解并持续学习的一个领域,因此我做了微 ...

  4. vmstat输出项解释

    输出项的解释例如以下: procs * r列表示执行和等待cpu时间片段的进程数,这个值假设长期大约系统cpu个数.说明cpu不足 * b列表示在等待资源的进程数.比方正在等待IO或者内存交换等等 m ...

  5. 模式识别之ocr---文字识别Tesseract-OCR 进行文字识别 VS2010

    近日做铸件文字识别的项目,需要识别铸件上的字符和数字,找到开源的识别库Tesseract,下面简单记录下怎么使用. 首先在项目主页http://code.google.com/p/tesseract- ...

  6. ramfs、rootfs和initramfs【转】

    ramfs, rootfs and initramfs October 17, 2005 Rob Landley <rob@landley.net> =================== ...

  7. 经典的printk 写法

    经典的printk 写法: printk("[lynn--%s@%d]: addr:0x%x  \n",__func__,__LINE__,obj->client->a ...

  8. Flask的配置文件 与 session

    配置文件 flask中的配置文件是一个flask.config.Config对象(继承字典) 默认配置为: { 'DEBUG': get_debug_flag(default=False), 是否开启 ...

  9. Git-flow 一个简单高效的Git工作流

    背景 由于Git的分支比SVN更好管理且更易使用,最近团队从SVN迁移到Git,需要重新规划开发流程,最终确定使用Git-flow工作流,这是目前比较流行的一种分支模型,下面是Git-flow的简易流 ...

  10. jquery对所有<input type="text"的控件赋值

    function resetData() {      $("input[type=text]").each(      function() {     $(this).attr ...