javax.el.PropertyNotFoundException: 类型[cn.cqsw.pojo.Course]上找不到属性[CourseId]
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”
1 Caused by: org.apache.jasper.JasperException: 在 [33] 行处理 [/course-list.jsp] 时发生异常 30: </tr>
31: <c:forEach var="course" items="${courses}">
32: <tr>
33: <td>${course.CourseId}</td>
34: <td>${course.courseName}</td>
35: <td>${course.courseMajor}</td>
36: <td>${course.userName}</td> Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:617)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:514)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316)
at cn.cqsw.controller.CourseServlet.findAll(CourseServlet.java:33)
... 30 more
Caused by: javax.el.PropertyNotFoundException: 类型[cn.cqsw.pojo.Course]上找不到属性[CourseId]
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:260)
at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:212)
at javax.el.BeanELResolver.property(BeanELResolver.java:333)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:92)
at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:944)
at org.apache.jsp.course_002dlist_jsp._jspx_meth_c_005fforEach_005f0(course_002dlist_jsp.java:192)
at org.apache.jsp.course_002dlist_jsp._jspService(course_002dlist_jsp.java:144)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)
... 43 more
实体类
private Integer CourseId;
private String courseName;
private String courseMajor;
private String userName;
private String addDate;
修改
<c:forEach var="course" items="${courses}">
<tr>
<td>${course.courseId}</td>
<td>${course.courseName}</td>
<td>${course.courseMajor}</td>
<td>${course.userName}</td>
<td>${course.addDate}</td>
<td><input type="button" value="删除" onclick="location.href='/course?method=delById&cid=${course.courseId}'"></td>
</tr>
</c:forEach>
将获取courseId的时候首字母改为了小写,成功获取到了现实的值。
希望对大家有用
javax.el.PropertyNotFoundException: 类型[cn.cqsw.pojo.Course]上找不到属性[CourseId]的更多相关文章
- javax.el.PropertyNotFoundException: 类型[xx.xxx.xxxx]上找不到属性[xxxx]
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException" 1 Caused by: org.apache.jasper.Jasp ...
- 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 ...
- 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 ...
- Caused by: javax.el.PropertyNotFoundException: Property 'product' not found on type java.lang.String
今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException”,经过debug和打印将问题定位到这段代码: HTML应该是没啥问题,看提示在ja ...
- javax.el.PropertyNotFoundException 出错
之所以是把他记下来,是因为这个低级错误 害的我找了老半天. 后台传了对象到页面,在页面中循环遍历获得对象某个属性值 如下: <c:forEach items="${resultMap. ...
- javax.el.PropertyNotFoundException:
javax.el.PropertyNotFoundException: Property 'ContextPath' not found on type org.apache.catalina.cor ...
- 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: 异常处理
javax.el.PropertyNotFoundException: Property 'policyId' not found on type com.omhy.common.model.enti ...
随机推荐
- 关于Js的那些面试题
1.javascript的typeof返回哪些数据类型 number string boolean Object function underfind 2.例举3种强制类型转换和2种隐式类型转换?强制 ...
- c:\Windows\system32\rundll32.exe Windows无法访问指定设备、路径或文件,你可能没有适当的权限访问该项目
非常懂如何修改权限的可以尝试,否则老老实实地重新注册的系统的.dll文件 重新注册方法如下: WIN+R下输入命令: cmd /c for %i in (%windir%\system32\*.dll ...
- SpringBoot2 整合ElasticJob框架,定制化管理流程
本文源码:GitHub·点这里 || GitEE·点这里 一.ElasticJob简介 1.定时任务 在前面的文章中,说过QuartJob这个定时任务,被广泛应用的定时任务标准.但Quartz核心点在 ...
- 一文详解Hexo+Github小白建站
作者:玩世不恭的Coder时间:2020-03-08说明:本文为原创文章,未经允许不可转载,转载前请联系作者 一文详解Hexo+Github小白建站 前言 GitHub是一个面向开源及私有软件项目的托 ...
- Oracle根据实体类比对2个数据库结构差异(demo)
源起 在公司做项目时 经常出现 实体结构和线上的数据结构以及公司开发库数据结构不匹配的问题 但是又不能直接把开发库导入到生产库因为生产库已经有实际数据了 所以弄了一个小工具 此处只做记录用 demo级 ...
- (转)协议森林10 魔鬼细节 (TCP滑窗管理)
协议森林10 魔鬼细节 (TCP滑窗管理) 作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 在TCP协议与"流" ...
- 使用Netty如何解决拆包粘包的问题
首先,我们通过一个DEMO来模拟TCP的拆包粘包的情况:客户端连续向服务端发送100个相同消息.服务端的代码如下: AtomicLong count = new AtomicLong(0); NioE ...
- 面向对象第三单元博客(JML)
// demo/Graph.java package demo; import java.util.ArrayList; public class Demo { /*@ public norm ...
- Natas12 Writeup(文件上传漏洞)
Natas12: 文件上传页面,源码如下: function genRandomString() { $length = 10; $characters = "0123456789abcde ...
- nmon使用问题汇总(不定期更新)
nmon使用问题汇总 1.nmon常用命令: ./nmon -s1 -c300 -f -m /root/nmon-test-result/项目-50并发/ 2.设置nmon参数为-s1 -c720,发 ...