标签logic:iterate 对HashMap 中的键(key)值(value)

  1. <%
  2. HashMaphm=newHashMap();
  3. hm.put(1,"aa");
  4. hm.put(2,"bb");
  5. hm.put(3,"cc");
  6. hm.put(4,"dd");
  7. request.setAttribute("hm",hm);
  8. %>
  9. <logic:notEmptyname="hm">
  10. <logic:iterateid="li"name="hm">
  11. ${li.key}=======${li.value}<br>
  12. </logic:iterate>
  13. </logic:notEmpty>

你可能感兴趣的:(HashMap)