code096.jsp

<%@page import="java.util.ArrayList"%><%@page import="java.util.List"%><%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%>EL表達式獲取List集合的數據<%List list1 = new ArrayList();list1.add("面包");list1.add("牛奶");list1.add("鈔票");session.setAttribute("goods", list1);%><%List list2 = (List)session.getAttribute("goods");for(int i=0;i	${index}: ${goods[index]}
<%}%>