如题:数据结构如下
Map<String, List<GatherMess>> sMap=new HashMap<String, List<GatherMess>>();

List<GatherMess> gList=new ArrayList<GatherMess>();GatherMess gatherMess=new GatherMess();gatherMess.setUserName("zhang");
gatherMess.setMessNum(2);
gList.add(gatherMess);gatherMess.setUserName("yang");
gatherMess.setMessNum(3);
gList.add(gatherMess);sMap.put("sannong", gList);

解决方案 »

  1.   


    <c:forEach items="${map}" var="m">
        <c:forEach items="${m.list}" var="l">
             //输出list的数据
       </c:forEach>
    </c:forEach>
      

  2.   

    <c:forEach items="${map}" var="m">
        <c:forEach items="${m.value}" var="l">
             //输出list的数据
       </c:forEach>
    </c:forEach>
      

  3.   


    你这个方法也不对,页面上没有数据,后来发现是我少写了个value导致,还是谢谢了