<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
request.setAttribute("path", request.getContextPath());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<c:if test="${!empty studentList}">
<h1>List集合中的参数</h1>
<table border="1px" cellpadding="0" cellspacing="0" width="200px">
<tr>
<th>学生学号:</th>
<th>学生姓名:</th>
</tr>
<c:forEach items="${studentList.students}" var="student">
<tr>
<th>${student.studentNo}</th>
<th>${student.studentName}</th>
</tr>
</c:forEach>
</table>
</c:if>
<c:if test="${!empty studentSet}">
<h1>Set集合中的参数</h1>
<table border="1px" cellpadding="0" cellspacing="0" width="200px">
<tr>
<th>学生学号:</th>
<th>学生姓名:</th>
</tr>
<c:forEach items="${stuSet.studentSet}" var="student">
<tr>
<th>${student.studentNo}</th>
<th>${student.studentName}</th>
</tr>
</c:forEach>
</table>
</c:if>
<c:if test="${!empty stuMap}">
<h1>Map集合中的参数</h1>
<table border="1px" cellpadding="0" cellspacing="0" width="500px">
<tr>
<th>Key</th>
<th>学生学号:</th>
<th>学生姓名:</th>
</tr>
<c:forEach items="${stuMap.studentMap}" var="item">
<tr>
<th>${item.key}</th>
<th>${item.value.studentNo}</th>
<th>${item.value.studentName}</th>
</tr>
</c:forEach>
</table>
</c:if>
<c:if test="${!empty stuArray}">
<h1>数组遍历</h1>
<table border="1px" cellpadding="0" cellspacing="0" width="500px">
<tr>
<th>序号</th>
<th>名称</th>
</tr>
<c:forEach items="${stuArray.studentName}" var="items" varStatus="st">
<tr>
<th>${st.count}</th>
<th>${items}</th>
</tr>
</c:forEach>
</table>
</c:if>
</body>
</html>