首先管理员页面
代码:
<%@ 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>
<%} %>
<center>
<h1>
管理员界面
</h1>
<form name="form" method="post" action="Screen.jsp">
<input type="submit" value="返回主页">
</form>
</center>
<div align="center">
<form name="form" action="Servlet?method=ViewinformationManager" method="post" onsubmit="return check()">
<input type="submit" value="查看学生信息" />
</form>
<form name="form" method="post" action="Addteacher.jsp">
<input type="submit" value=" 新增教师 ">
</form>
<form name="form" action="Servlet?method=Examineinformation" method="post" onsubmit="return check()">
<input type="submit" value="审核学生申请" />
</form>
</div>
</body>
</html>
</body>
</html>
之后,新增教师
代码:
<%@ 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>
<%} %>
<center>
<h1>
添加教师信息
</h1>
</center>
<div align="center">
<form name="form" action="Servlet?method=AddTeacher" method="post" onsubmit="return check()">
工号
<input type="text" name="TeacherID" />
<p>
姓名
<input type="text" name="Name" />
<p>
所属学院
<input type="text" name="College" />
<p>
所属专业:
<input type="text" name="Professionals" />
<p>
<select name="Role">
<option value="001">专业教师</option>
<option value="010">专业负责人</option>
<option value="111">教学副院长</option>
</select>
<p>
密码:
<input type="text" name="Mima" />
<p>
<input type="submit" value="注册" />
</form>
</div>
</body>
</html>
审核学生界面:
代码:
<%@ 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>
<%} %>
<center>
<h1>
审核学生信息
</h1>
<form name="form" method="post" action="Manager.jsp">
<input type="submit" value="返回管理员功能页">
</form>
</center>
<div align="center">
<table align="center" border="1" width="500">
<tr>
<td>学号</td>
<td>姓名</td>
<td>性别</td>
<td>所属学院</td>
<td>所属专业</td>
<td>手机</td>
<td>职位</td>
<td>密码</td>
<td>状态</td>
<td>操作</td>
</tr>
<c:forEach items="${bean}" var="item" varStatus="status">
<tr>
<td>${item.getStuID()}</td>
<td>${item.getStuName()}</td>
<td>${item.getSex()}</td>
<td>${item.getCollege()}</td>
<td>${item.getProfessionals()}</td>
<td>${item.getPhone()}</td>
<td>${item.getPosition()}</td>
<td>${item.getMima()}</td>
<td>${item.getSituation()}</td>
<td>
<form name="form" action="Servlet?method=Allow&StuID=${item.getStuID()}" method="post" onsubmit="return check()">
<input type="submit" value="批准">
</form>
</td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>
标签:JAVA,上机,getAttribute,Object,item,2021,UTF,message,null From: https://www.cnblogs.com/JIANGzihao0222/p/17003408.html