问题描述
- web项目部署.jsp 找不到id
-
${news.id}
${news.title}
${news.timelength}/c:forEach
错误提示:
javax.el.PropertyNotFoundException: Property 'id' not found on type java.lang.String
javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:266)
javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:243)
javax.el.BeanELResolver.property(BeanELResolver.java:353)
javax.el.BeanELResolver.getValue(BeanELResolver.java:97)
org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104)
org.apache.el.parser.AstValue.getValue(AstValue.java:183)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:967)
org.apache.jsp.news_jsp._jspx_meth_c_005fforEach_005f0(news_jsp.java:118)
org.apache.jsp.news_jsp._jspService(news_jsp.java:72)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
解决方案
news里面没有id属性,查查你的news
解决方案二:
楼上说的真确 再补充一点 也有可能是你的news里加了,但是你的news对应的配置文件没有;核查这两个文件里这个字段