javax.el.PropertyNotFoundException: 类型[xx.xxx.xxxx]上找不到属性[xxxx]
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”
1 Caused by: org.apache.jasper.JasperException: 在 [33] 行处理 [/course-list.jsp] 时发生异常
2
3 30: </tr>
4 31: <c:forEach var="course" items="${courses}">
5 32: <tr>
6 33: <td>${course.CourseId}</td>
7 34: <td>${course.courseName}</td>
8 35: <td>${course.courseMajor}</td>
9 36: <td>${course.userName}</td>
10
11
12 Stacktrace:
13 at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:617)
14 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:514)
15 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
16 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
17 at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
18 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
19 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
20 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
21 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
22 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
23 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
24 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470)
25 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
26 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316)
27 at cn.cqsw.controller.CourseServlet.findAll(CourseServlet.java:33)
28 ... 30 more
29 Caused by: javax.el.PropertyNotFoundException: 类型[cn.cqsw.pojo.Course]上找不到属性[CourseId]
30 at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:260)
31 at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:212)
32 at javax.el.BeanELResolver.property(BeanELResolver.java:333)
33 at javax.el.BeanELResolver.getValue(BeanELResolver.java:92)
34 at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
35 at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
36 at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
37 at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:944)
38 at org.apache.jsp.course_002dlist_jsp._jspx_meth_c_005fforEach_005f0(course_002dlist_jsp.java:192)
39 at org.apache.jsp.course_002dlist_jsp._jspService(course_002dlist_jsp.java:144)
40 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
41 at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
42 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)
43 ... 43 more
实体类
private Integer CourseId;
private String courseName;
private String courseMajor;
private String userName;
private String addDate;
修改
1 <c:forEach var="course" items="${courses}">
2 <tr>
3 <td>${course.courseId}</td>
4 <td>${course.courseName}</td>
5 <td>${course.courseMajor}</td>
6 <td>${course.userName}</td>
7 <td>${course.addDate}</td>
8 <td><input type="button" value="删除" onclick="location.href='/course?method=delById&cid=${course.courseId}'"></td>
9 </tr>
10 </c:forEach>
将获取courseId的时候首字母改为了小写,成功获取到了现实的值。
希望对大家有用
javax.el.PropertyNotFoundException: 类型[xx.xxx.xxxx]上找不到属性[xxxx]的更多相关文章
- javax.el.PropertyNotFoundException: 类型[cn.cqsw.pojo.Course]上找不到属性[CourseId]
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException” 1 Caused by: org.apache.jasper.JasperExc ...
- javax.el.PropertyNotFoundException: Property 'XXX' not found on type bean.XXXXX
javax.el.PropertyNotFoundException: Property 'XXX' not found on type bean.XXXXX 先检查页面语法是否有问题,后在页面的el ...
- org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property [xxx] not readable on type [xxx]
由于javaBean中的属性是custFullName,所以在使用jsp的时候,通过el表达式获取属性的值<td>${m.CustFullName}</td>.但是加载页面的时 ...
- Caused by: javax.el.PropertyNotFoundException: Property 'product' not found on type java.lang.String
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”,经过debug和打印将问题定位到这段代码: HTML应该是没啥问题,看提示在ja ...
- hibernate.validator.constraints.NotEmpty校验请求参数报错java.lang.NoClassDefFoundError: javax/el/PropertyNotFoundException
spring maven项目,使用hibernate validator 注解形式校验客户端的请求参数. hibernate-validator版本:5.0.2.Final validation-ap ...
- 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 ...
- 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 ...
- javax.el.PropertyNotFoundException 出错
之所以是把他记下来,是因为这个低级错误 害的我找了老半天. 后台传了对象到页面,在页面中循环遍历获得对象某个属性值 如下: <c:forEach items="${resultMap. ...
- javax.el.PropertyNotFoundException:
javax.el.PropertyNotFoundException: Property 'ContextPath' not found on type org.apache.catalina.cor ...
随机推荐
- 【划重点】Python matplotlib绘图设置坐标轴的刻度
一.语法简介 plt.xticks(ticks,labels,rotation=30,fontsize=10,color='red',fontweight='bold',backgroundcolor ...
- CF1097B Petr and a Combination Lock 题解
Content 有一个锁,它只有指针再次指到 \(0\) 刻度处才可以开锁(起始状态如图所示,一圈 \(360\) 度). 以下给出 \(n\) 个操作及每次转动度数,如果可以通过逆时针或顺时针再次转 ...
- SQL Server日志恢复还原数据
通过日志还原,首先要注意的是: 1,在数据库更新和删除之前有一个完整的备份. 2,在更新和删除之后,做一个日志备份. 3,该日志只能用于还原数据库备份和日志备份时间之间的数据. 下面看整个数据库备份和 ...
- JavaWebServle执行流程解析
Servlet Servlet 1.定义: 注:servlet版本2.5 Servlet是Java的一个类.既然是一个类.那必然要遵循一定的规范.如下所示. a.必须继承 javax.servlet. ...
- SpringBoot整合nacos实现配置中心(配置动态更新)
官方教程:https://nacos.io/zh-cn/docs/quick-start-spring-boot.html Linux使用docker部署nacos:https://www.cnblo ...
- 使用mysql查询语句统计数据,如果是null值则赋值为0
select IFNULL(sum(total_view),0) from 如果统计total_view这列为null ,则返回默认值0
- jquery gantt 的使用
1.引入css与js文件 <link rel="stylesheet" href="css/style.css" /> <script src ...
- js中字符串和数组的常用转换处理方法
1.split("分割条件(正则表达式或者字符)") 字符串 ==> 数组 默认返回数组 (1) 将单词分割为字符 "hello".split(" ...
- 深入理解Akka Actor模型
Carl Hewitt 在1973年对Actor模型进行了如下定义:"Actor模型是一个把'Actor'作为并发计算的通用原语". Actor是异步驱动,可以并行和分布式部署及运 ...
- 【LeetCode】213. House Robber II 解题报告(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/house-rob ...