<%
HashMap map1 = new HashMap();
map1.put("key1","lzsb")
request.setAttribute("map1", map1);
%>
取值
${map1["key1"]}
遍历
<c:forEach items="${map1}" var="i">
${i.key}
${i.value}
</c:forEach>
EL表达式 MAP取值
最新推荐文章于 2023-06-08 00:40:36 发布
<%
HashMap map1 = new HashMap();
map1.put("key1","lzsb")
request.setAttribute("map1", map1);
%>
取值
${map1["key1"]}
遍历
<c:forEach items="${map1}" var="i">
${i.key}
${i.value}
</c:forEach>