选课系统jsp
1.jsp
<%@ 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>
<frameset cols="100%,*">
<frame src="tealeft.jsp">
</frameset>
</frameset>
<body>
</body>
</html>
2.jsp
<%@ 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>
<frameset cols="100%,*">
<frame src="stuleft.jsp">
</frameset>
</frameset>
<body>
</body>
</html>
3.jsp
<%@ 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>
<frameset cols="100%,*">
<frame src="guanlileft.jsp">
</frameset>
</frameset>
<body>
</body>
</html>
addcourse.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>添加学生信息</title> <script> </script> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <form action="xuankeServlet?method=addcou" method="post" onsubmit="return check()"> <tr> <td><a href="tealeft.jsp">返回教师功能页面</a></td> </tr> <tr> <td>课程编号:</td> <td><input type="text" name="cpid" id="cpid"></td> </tr> <tr> <td>课程名称:</td> <td><input type="text" name="cname" id="cname"></td> </tr> <tr> <td>选课人数:</td> <td><input type="text" name="num" id="num"></td> </tr> <tr> <tr align="center"> <th colspan="2"> <input type="submit" value="提交"> </th> </tr> </form> </table> </body> </html>
addstu.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>添加学生信息</title> <script> </script> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <form action="xuankeServlet?method=addstu" method="post" onsubmit="return check()"> <tr> <td><a href="guanlileft.jsp">返回管理员功能页面</a></td> </tr> <tr> <td>学号:</td> <td><input type="text" name="spid" id="spid"></td> </tr> <tr> <td>姓名:</td> <td><input type="text" name="stuname" id="stuname"></td> </tr> <tr> <td>性别</td> <td> <select name="sex"> <option value="男">男</option> <option value="女">女</option> </select> </td> </tr> <tr> <td>学生所在班级:</td> <td><input type="text" name="banji" id="banji"></td> </tr> <tr> <td>所属专业:</td> <td><input type="text" name="ye" id="ye"></td> </tr> <tr align="center"> <th colspan="2"> <input type="submit" value="提交"> </th> </tr> </form> </table> </body> </html>
addtea.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>添加教师信息</title> <script> </script> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <form action="xuankeServlet?method=addtea" method="post" onsubmit="return check()"> <tr> <td><a href="guanlileft.jsp">返回管理员功能页面</a></td> </tr> <tr> <td>教师工号:</td> <td><input type="text" name="tpid" id="tpid"></td> </tr> <tr> <td>教师姓名:</td> <td><input type="text" name="teaname" id="teaname"></td> </tr> <tr> <td>性别</td> <td> <select name="sex"> <option value="男">男</option> <option value="女">女</option> </select> </td> </tr> <tr> <td>教师所在学院:</td> <td><input type="text" name="txueyuan" id="txueyuan"></td> </tr> <tr> <td>职称:</td> <td> <select name="zhicheng"> <option value="教授">教授</option> <option value="副教授">副教授</option> <option value="讲师">讲师</option> <option value="助教">助教</option> </select> </td> </tr> <tr align="center"> <th colspan="2"> <input type="submit" value="提交"> </th> </tr> </form> </table> </body> </html>
chakankecheng.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>课程信息详情</title> <style> .a{ margin-top: 20px; } .b{ font-size: 20px; width: 160px; color: white; background-color: greenyellow; } .tb, td { border: 0px solid black; font-size: 22px; } </style> </head> <body> <div align="center"> <h1 style="color: black;">课程详细信息</h1> <table class="tb"> <tr> <td><a href="stuleft.jsp">返回学生功能页面</a></td> </tr> <tr> <td>课程编号</td> <td>课程名称</td> <td>课程容量</td> <td>课程选课人数</td> <td>任课教师</td> </tr> <tr> <td>${cou.cpid}</td> <td>${cou.cname}</td> <td>${cou.num}</td> <td>${cou.snum}</td> <td>${cou.jiaoshi}</td> </tr> </table> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <form action="xuankeServlet?method=xuanke" method="post" onsubmit="return check()"> <tr> <td><input type="hidden" name="cpid" id="cpid" value="${cou.cpid}"></td> </tr> <tr> <td><input type="hidden" name="snum" id="snum" value="${cou.snum}"></td> </tr> <tr> <td><input type="hidden" name="jiaoshi" id="jiaoshi" value="${cou.jiaoshi}"></td> </tr> <tr align="center"> <th colspan="2"> <input type="submit" value="选课"> </th> </tr> </form> </table> </div> </body> </html>
guanlileft.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>管理员功能页面</title>
</head>
<body>
<table align="center" border="0px" cellpadding="10px" cellspacing="10px">
<form action="xuankeServlet?method=addtea" method="post" onsubmit="return check()">
<tr>
<td><a href="login.jsp">返回登陆页面</a></td>
</tr>
<tr>
<td>管理员功能页面</td>
</tr>
<tr>
<td><a href="addtea.jsp">添加教师信息</a></td>
</tr>
<tr>
<td><a href="addstu.jsp">添加学生信息</a></td>
</tr>
</form>
</table>
</body>
</html>
houtai.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>跳转页面</title>
</head>
<body>
<a href="${pid}.jsp">跳转</a>
</body>
</html>
liulankecheng.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">课程信息列表</h1> <table class="tb"> <tr> <td><a href="stuleft.jsp">返回学生功能页面</a></td> </tr> <tr> <td> 课程名称 </td> </tr> <c:forEach items="${cous}" var="item"> <tr> <td> <a href="xuankeServlet?method=chakan&id=${item.id}">${item.cname}</a></td> </tr> </c:forEach> </table> </div> </body> </html>
liulankecheng1.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>学生浏览课程信息</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">课程信息列表</h1> <table class="tb"> <tr> <td><a href="stuleft.jsp">返回学生功能页面</a></td> </tr> <tr> <td>课程编号</td> <td>课程名称</td> <td>课程容量</td> <td>课程选课人数</td> <td>任课教师</td> </tr> <c:forEach items="${cous}" var="item"> <tr> <td>${item.cpid}</td> <td>${item.cname}</td> <td>${item.num}</td> <td>${item.snum}</td> <td>${item.jiaoshi}</td> </tr> </c:forEach> </table> </div> </body> </html>
liulanstu.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>教师浏览学生信息</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">课程信息列表</h1> <table class="tb"> <tr> <td><a href="tealeft.jsp">返回教师功能页面</a></td> </tr> <tr> <td>学生学号</td> <td>学生姓名</td> <td>学生性别</td> <td>学生所在班级</td> <td>学生专业</td> </tr> <c:forEach items="${jibens}" var="item"> <tr> <td>${item.spid}</td> <td>${item.stuname}</td> <td>${item.sex}</td> <td>${item.banji}</td> <td>${item.ye}</td> </tr> </c:forEach> </table> </div> </body> </html>
login.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户登录</title>
</head>
<body>
<table align="center" border="0px" cellpadding="10px" cellspacing="10px">
<form action="xuankeServlet?method=login" method="post" onsubmit="return check()">
<tr>
<td>用户名:</td>
<td><input type="text" name="username" id="username"></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr align="center">
<th colspan="2">
<input type="submit" value="登录">
</th>
</tr>
</form>
</table>
</body>
</html>
stuleft.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生管理页面</title>
</head>
<body>
<table align="center" border="0px" cellpadding="10px" cellspacing="10px">
<form action="xuankeServlet?method=addtea" method="post" onsubmit="return check()">
<tr>
<td><a href="login.jsp">返回登陆页面</a></td>
</tr>
<tr>
<td>学生功能页面</td>
</tr>
<tr>
<td><a href="xuankeServlet?method=liulankecheng">选课</a></td>
</tr>
<tr>
<td><a href="updates.jsp">修改个人信息</a></td>
</tr>
<tr>
<td><a href="xuankeServlet?method=liulankecheng1">浏览课程信息</a></td>
</tr>
</form>
</table>
</body>
</html>
sucess.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <tr> <td><a href="xuankeServlet?method=liulankecheng">返回选课</a></td> </tr> </table> </body> </html>
tealeft.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>教师功能页面</title>
</head>
<body>
<table align="center" border="0px" cellpadding="10px" cellspacing="10px">
<form action="xuankeServlet?method=addtea" method="post" onsubmit="return check()">
<tr>
<td><a href="login.jsp">返回登陆页面</a></td>
</tr>
<tr>
<td>教师功能页面</td>
</tr>
<tr>
<td><a href="addcourse.jsp">添加课程信息</a></td>
</tr>
<tr>
<td><a href="updatet.jsp">修改个人信息</a></td>
</tr>
<tr>
<td><a href="xuankeServlet?method=liulanstu">浏览选课学生信息</a></td>
</tr>
</form>
</table>
</body>
</html>
updates.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>修改学生信息</title> <script> </script> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <form action="xuankeServlet?method=updatestu" method="post" onsubmit="return check()"> <tr> <td><a href="stuleft.jsp">返回学生功能页面</a></td> </tr> <tr> <td>姓名:</td> <td><input type="text" name="stuname" id="stuname"></td> </tr> <tr> <td>性别</td> <td> <select name="sex"> <option value="男">男</option> <option value="女">女</option> </select> </td> </tr> <tr> <td>学生所在班级:</td> <td><input type="text" name="banji" id="banji"></td> </tr> <tr> <td>所属专业:</td> <td><input type="text" name="ye" id="ye"></td> </tr> <tr align="center"> <th colspan="2"> <input type="submit" value="提交"> </th> </tr> </form> </table> </body> </html>
updatet.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>修改教师信息</title> <script> </script> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <table align="center" border="0px" cellpadding="10px" cellspacing="10px"> <form action="xuankeServlet?method=updatetea" method="post" onsubmit="return check()"> <tr> <td><a href="tealeft.jsp">返回教师功能页面</a></td> </tr> <tr> <td>教师姓名:</td> <td><input type="text" name="teaname" id="teaname"></td> </tr> <tr> <td>性别</td> <td> <select name="sex"> <option value="男">男</option> <option value="女">女</option> </select> </td> </tr> <tr> <td>教师所在学院:</td> <td><input type="text" name="txueyuan" id="txueyuan"></td> </tr> <tr> <td>职称:</td> <td> <select name="zhicheng"> <option value="教授">教授</option> <option value="副教授">副教授</option> <option value="讲师">讲师</option> <option value="助教">助教</option> </select> </td> </tr> <tr align="center"> <th colspan="2"> <input type="submit" value="提交"> </th> </tr> </form> </table> </body> </html>

浙公网安备 33010602011771号