前提是:
获取数据:
List<ProductType> childtypes = productTypeService.getScrollData(ProductType.class, jpqltypes.toString(), typeparams.toArray()).getResultList();
for(ProductType type : childtypes){
System.out.println("----------type name is: " + type.getName());
}
request.setAttribute("childtypes", childtypes);
前台显示:
<c:forEach items="childtypes" var="entry">
<li><a href="<html:rewrite action="/product/list"/>?sort=sellpriceasc&typeid=${entry.typeid}&sex=${param.sex }&brandid=${param.brandid}&style=${param.style}">${entry.name }</a></li>
</c:forEach>
并且在ProductType类里是有typeid属性的,
结果还是报这个错!
解决方案:
<c:forEach items="childtypes" var="entry">
改为:
<c:forEach items="${childtypes}" var="entry">