EL表达式之 c:forEach 标签

<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>




Insert title here



  
  
  
  	${index }
  
  <%
  	List list = new ArrayList();
  	list.add("12345");
  	list.add("22345");
  	list.add("32345");
  	list.add("42345");
  	pageContext.setAttribute("list", list);
  	Map map = new HashMap();
  	map.put("k1", "v1");
  	map.put("k2", "v2");
  	map.put("k3", "v3");
  	map.put("k4", "v4");
  	pageContext.setAttribute("map", map);
  %>
  
   
hehe ${item }

${item }, ${item.key } , ${item.value }, ${vs },${vs.current },${vs.first },${vs.count },${vs.index }

 

你可能感兴趣的:(javaweb)