index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<style>
.a{
font-size: 26px;
margin-top: 20px;
}
</style>
</head>
<body>
<div align="center">
<h1 style="color: red;">欢迎来到课程系统</h1>
<div class="a">
<a href="addInput.jsp">增</a>
</div>
<div class="a">
<a href="list.jsp">删</a>
</div>
<div class="a">
<a href="list.jsp">改</a>
</div>
<div class="a">
<a href="list.jsp">查</a>
</div>
</div>
</body>
</html>
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<style>
.a{
font-size: 26px;
margin-top: 20px;
}
</style>
</head>
<body>
<div align="center">
<h1 style="color: red;">欢迎来到课程系统</h1>
<div class="a">
<a href="addInput.jsp">增</a>
</div>
<div class="a">
<a href="list.jsp">删</a>
</div>
<div class="a">
<a href="list.jsp">改</a>
</div>
<div class="a">
<a href="list.jsp">查</a>
</div>
</div>
</body>
</html>
list.jsp
<%@page import="com.jaovo.msg.model.User"%>
<%@page import="java.util.List"%>
<%@page import="com.jaovo.msg.dao.UserDaoImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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>用户展示界面</title>
</head>
<%
UserDaoImpl userDao = new UserDaoImpl();
List<User> users = userDao.load();
%>
<body>
<table align="center" border="1" width="500">
<tr>
<td>课程编号</td>
<td>课程名称</td>
<td>开课时间</td>
<td>开课节次</td>
<td>所属学院</td>
<td>教师工号</td>
<td>教师名称</td>
<td>限制人数</td>
</tr>
<%
for( User user : users ){
%>
<tr>
<td> <%=user.getId() %></td>
<td> <%=user.getName() %></td>
<td> <%=user.getTime() %></td>
<td> <%=user.getJieci() %></td>
<td> <%=user.getCollege() %></td>
<td> <%=user.getTid() %></td>
<td> <%=user.getTname() %></td>
<td> <%=user.getNumber() %></td>
<td> <a href="delete.jsp?id=<%=user.getId() %>" >删除</a></td>
<td> <a href="updateInput.jsp?id=<%=user.getId() %>" >修改</a></td>
</tr>
<%
}
%>
</table>
</body>
</html>
<%@page import="java.util.List"%>
<%@page import="com.jaovo.msg.dao.UserDaoImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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>用户展示界面</title>
</head>
<%
UserDaoImpl userDao = new UserDaoImpl();
List<User> users = userDao.load();
%>
<body>
<table align="center" border="1" width="500">
<tr>
<td>课程编号</td>
<td>课程名称</td>
<td>开课时间</td>
<td>开课节次</td>
<td>所属学院</td>
<td>教师工号</td>
<td>教师名称</td>
<td>限制人数</td>
</tr>
<%
for( User user : users ){
%>
<tr>
<td> <%=user.getId() %></td>
<td> <%=user.getName() %></td>
<td> <%=user.getTime() %></td>
<td> <%=user.getJieci() %></td>
<td> <%=user.getCollege() %></td>
<td> <%=user.getTid() %></td>
<td> <%=user.getTname() %></td>
<td> <%=user.getNumber() %></td>
<td> <a href="delete.jsp?id=<%=user.getId() %>" >删除</a></td>
<td> <a href="updateInput.jsp?id=<%=user.getId() %>" >修改</a></td>
</tr>
<%
}
%>
</table>
</body>
</html>