How to use HashMap in jsp

分类:Java 2010-03-25 来源:CodeWeblog.com 人气:327

Today, the project encountered in the background needs to be passed in Map <String, List <Meeting>> dateGroup types of collection in the jsp to display the beginning thought a lot of trouble, resulting in online search a bit old so simple, He He:

 [b]<c:forEach items="${dateGroupMap}" var="dateGroup" >[/b]
             <tr>
                [b]<td width="20%" valign="bottom">${dateGroup.key[/b]}</td>
             </tr>
             [b]<c:forEach items="${dateGroup.value}" var="meeting">[/b]
                         <tr>
                   <td colspan="4"><hr></td>
                 </tr>

                 <tr height="20">
                    <td height="20">${meeting.startDate}
                                <c:if test="${not empty meeting.endDate}">
                                     --${meeting.endDate}
                                </c:if>
                                </td>
                    <td height="20">${meeting.title}</td>
                    <td height="20">${meeting.location}</td>
                    <td height="20">${meeting.content}</td>
                 </tr>
                 </c:forEach>
     </c:forEach>
分享到:
blog comments powered by Disqus

相关文章

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.097 (s). 14 q(s)