学生管理系统,学生查看界面
<%@ page language="java" contentType="text/ html; charset=UTF-8"
pageEncoding="UTF-8" import = "java.util.*"%>
<%@page import="bean.student"%>
<%@page import="bean.tclass"%>
<%@page import="bean.teacher"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
teacher Ateacher=(teacher)session.getAttribute("Ateacher");
String ID = request.getParameter("ID");
List<tclass> Atclass=(List<tclass>)session.getAttribute("Atclass");
List<student> Astudent=(List<student>)session.getAttribute("Astudent");
out.println(Ateacher.getName());
session.setAttribute("Ateacher",Ateacher);
request.setAttribute("Ateacher",Ateacher);
session.setAttribute("Atclass",Atclass);
request.setAttribute("Atclass",Atclass);
session.setAttribute("Astudent",Astudent);
request.setAttribute("Astudent",Astudent);
%>
<form action="Saddc1.jsp" method="post" onsubmit="return chech(this)">
<table align="center" width="450" border="1">
<tr>
<td align="center" colspan="5">
<h2>浏览课程</h2>
</td>
</tr>
<tr aligh="center">
<td>学号</td>
<td>姓名</td>
<td>性别</td>
<td>班级</td>
<td>专业</td>
</tr>
<%
for(tclass p:Atclass){
if(p.getID().equals(ID))
{
String snum[]=p.getStu().split("\+");
for(String q:snum)
{
for(student t:Astudent)
{
if(t.getSunm().equals(q))
{
%>
<tr aligh="center">
<td><%=t.getSunm() %></td>
<td><%=t.getName()%></td>
<td><%=t.getSex() %></td>
<td><%=t.getSclass() %></td>
<td><%=t.getMajor() %></td>
<br>
</tr>
<%
}
}
}
break;
}
}
%>
<td><a href="user.jsp">注销</a></td>
<td><a href="loginS.jsp">返回上一级</a></td>
</table>
</form>
</body>
</html>