日期:2014-05-18  浏览次数:20632 次

c:forEach 时出错
原码是这样的:
<c:forEach   var= "item "   items= "${results} ">
<c:if   test= "${item.date   ==   '2007615 '} ">
<c:out   value= "${item.content} "/>
</c:if>
</c:forEach>
结果它把戏item.date   ==   '2007615 '   的   item.content   显示了   results.size   这么多遍..怎么也看不出错在哪里?


------解决方案--------------------
<c:if test= "${item.date == '2007615 '} ">
应该是条件不对。不然的话就不会显示多遍
试一下
<c:if test= "${item.date eq '2007615 '} ">