<tag:forEach var="currentFood" items="sessionScope.foods "varStatus="status"> </tag:forEach>
Stacktrace:] with root cause
javax.el.PropertyNotFoundException: Property 'xxx' not found on type java.lang.String
一直提示属性xxx未找到,谷歌了一下,有些说是Bean里没有Getter/Setter方法。
最后还是找到原因了。items里的内容缺少${}
如下:
<tag:forEach var="currentFood" items="${sessionScope.foods}"varStatus="status"> </tag:forEach>