日期:2014-05-17 浏览次数:20634 次
Map<String,String> map = new HashMap<String,String>();
map.put("a","aa");
map.put("b","bb");
ModelAndView mv = new ModelAndView();
mv.setViewName("/jsp/jyxw");
mv.addObject("list", map);
return mv;
<c:forEach items="${list }" var="map">
<h1>${map.key}--${map.value }</h1>
</c:forEach>
<c:forEach items="${list }" var="map">
<h1>${map[a]}</h1>
</c:forEach>
<c:forEach items="${list }" var="map">
<h1>${map['a']}</h1>
</c:forEach>
<c:forEach items="${list }" var="map">
<h1>${map["a"]}</h1>
</c:forEach>