日期:2014-05-18 浏览次数:20661 次
2. 遍历Map:
例:<%
HashMap months = new HashMap();
months.put(“Jan.”,”January”);
months.put(“Feb.”,”February”);
months.put(“Mar.”,”March”);
request.setAttribute(“months”,months);
%>
<logic:iterate id=”element” indexed=”index” name=”months”>
<bean:write name=”index” />.
<bean:write name=”element” property=”key” />:
<bean:write name=”element” property=”value” /><br />
</logic:iterate>