首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

javax.el.PropertyNotFoundException: Property 'id' not

2013-09-11 
求指教~org.apache.jasper.JasperException: An exception occurred processing JSP page /show.jsp at li

求指教~
org.apache.jasper.JasperException: An exception occurred processing JSP page /show.jsp at line 38

35:  
36: <c:forEach items="${List}" var="list">
37: <tr>
38: <td>${list.id}</td>
39: <td>${list.age} </td>
40: <td>${list.name}</td>
41: <td>${list.tel}</td>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.cn.xyf.query.ShowAllUsers.doPost(ShowAllUsers.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause 

javax.el.PropertyNotFoundException: Property 'id' not readable on type int
javax.el.BeanELResolver$BeanProperty.read(BeanELResolver.java:259)
javax.el.BeanELResolver$BeanProperty.access$000(BeanELResolver.java:209)
javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstValue.getValue(AstValue.java:97)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)
org.apache.jsp.show_jsp._jspx_meth_c_005fforEach_005f0(show_jsp.java:137)
org.apache.jsp.show_jsp._jspService(show_jsp.java:96)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.cn.xyf.query.ShowAllUsers.doPost(ShowAllUsers.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.



我id和age两个都是int类型的 但是我把读取id这个删掉后是可以用EL读取出age的

[解决办法]
com.cn.xyf.query.ShowAllUsers.doPost(ShowAllUsers.java:34)
你是不是绑定list的时候没有添加id
[解决办法]
楼主能将list中所存放对象实体类,展现出来吗?PropertyNotFoundException 这个异常通常是指list.id在实体类中找不到对应的属性
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.myexception.cn/j2se/33144.html

热点排行