代码为:
List<Map<String, Object>> shoplist= getshop.getshops();
request.setAttribute("shops",shoplist);
System.out.println("商品信息 " + shoplist);
jsp中的代码片段:
<ul>
<c:forEach items="${shops}" var="shop">
<li>
<p><a href="javascript:;"><img src="${shop.simg}"></a></p>
<p><a href="javascript:;" class="name">${shop.sname}</a></p>
<p class="price"><em>¥</em>
${shop.sprice}
</p>
</li>
</c:forEach>
</ul>
其中用控制台输出list的内容为
商品信息 [{sid=4, sclass=213, simg=./images/content_bottom.png, sdiscount=32, sprice=6546, sname=werwer, soldprice=234}, {sid=3, sclass=444, simg=./images/content_bottom.png, sdiscount=111, sprice=222, sname=qwe, soldprice=333}, {sid=2, sclass=1, simg=./images/content_bottom.png, sdiscount=2, sprice=22, sname=asd, soldprice=33}, {sid=1, sclass=1, simg=./images/content_bottom.png, sdiscount=1, sprice=22, sname=www, soldprice=33}]
但是最终效果是网页中c:forEach的片段输出空白,即使什么内容都没有,初学者,想不出哪里出了问题了,求大神打救