<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@page import="com.sanxia.javabase.chap15.service.StudentService"%>
<%@page import="com.sanxia.javabase.chap15.service.impl.StudentServiceImpl"%>
<%@page import="java.util.List"%>
<%@page import="com.sanxia.javabase.chap15.entity.Student"%>
<%
StudentService ss = new StudentServiceImpl();
List<Student> list = ss.getAllStudents();
//out.print(list.toString());
%>
<html>
<head>
<title>学生列表</title>
</head>
<body>
<table border="10px" width="60%" cellpadding="15px" cellspacing="5px">
<caption>学生列表</caption>
<tr><td colspan="6" align="right"><a href="add.html">增加学生</td></tr>
<tr>
<th>学号</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
<th>爱好</th>
<th>操作</th>
</tr>
<%
for(int i = 0;i<list.size();i++)
{
Student stu = list.get(i);
%>
<tr>
<td><%=stu.getStuId() %></td>
<td><%=stu.getStuName() %></td>
<td><%=stu.getStuId() %></td>
<td><%=stu.getStuId() %></td>
<td><%=stu.getStuId() %></td>
<!-- ?userName=tom&userPass=123456 -->
<td><a href="update.jsp?id=<%=stu.getStuId() %>">修改</a> <a href="del.jsp?id=<%=stu.getStuId() %>">删除</a></td>
</tr>
<%} %>
</table>
</body>
</html>