el表达式取map对象

<%
HashMap map1 = new HashMap();
map1.put("key1","lzsb")
request.setAttribute("map1", map1);
%>
取值
${map1["key1"]}

也可是一个el对象
${now}
${map1[now]}
也可
${map1["key1"].name}

 遍历
<c:forEach items="${map1}" var="i">
 ${i.key}
 ${i.value}
</c:forEach>

你可能感兴趣的:(el表达式,map取值)