Property 'typeid' not found on type java.lang.String

来源:互联网 发布:linux日志查看命令 编辑:程序博客网 时间:2024/05/29 08:25

在entity中是有typeid这个字段的,但是在前台显示的时候,一直报这个错误:

Property 'typeid' not found on type java.lang.String

后台:

request.setAttribute("productTypes", qr.getResultList());
前台显示:

<c:forEach items="productTypes" var="type">    ${type.typeid }${type.name }${type.note }<c:if test="${!empty type.parent }">${type.parent.name }</c:if></c:forEach>
items="productTypes"修改为
items="${productTypes }"解决问题。