foreach标签使用报错

Servlet.service() for servlet [jsp] threw exceptionjavax.el.PropertyNotFoundException: Property [productName] not found on type [java.lang.String] 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:347) 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:184)

今天用mybatis 查询列表的方法 list<对象> jsp页面用jstl foreach标签来接收 报了如上的错误,安装网上的给出的解决方法都不匹配 ,最后发现只是因为

${list }list后面多了个空格,去掉空格就可以正常显示了
 
  

你可能感兴趣的:(修炼)