📄 displaystudentjsp_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import bean.*;
import java.util.*;
public final class DisplayStudentJsp_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GB2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write('\r');
out.write('\n');
bean.StudentDataBean studentData = null;
synchronized (request) {
studentData = (bean.StudentDataBean) _jspx_page_context.getAttribute("studentData", PageContext.REQUEST_SCOPE);
if (studentData == null){
studentData = new bean.StudentDataBean();
_jspx_page_context.setAttribute("studentData", studentData, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>DisplayStudentJsp</title>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#FFFFFF\">\r\n");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "StudentMainFrame.jsp", out, true);
out.write("\r\n");
out.write("<br>\r\n");
out.write("<table width=\"90%\" style=\"height=2%\" border=\"0\" align=\"center\" cellpadding=\"4\" cellspacing=\"2\">\r\n");
out.write(" <tr bgcolor=\"#333333\">\r\n");
out.write(" <td height=\"22\" bgcolor=\"#FFFFCC\">\r\n");
out.write(" <font color=\"#000000\">\r\n");
out.write(" <strong>学生信息</strong>\r\n");
out.write(" </font>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <table width=100% style=\"height:5%\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" ");
String classname = null;
String majorname = null;
String depname = null;
List studentList = null;
try {
studentList = studentData.getStudentList();
}
catch (Exception e) {
}
Iterator studentListIterator = studentList.iterator();
StudentBean student;
StudentBean studentbean = new StudentBean();
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE4\">学号</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE4\">姓名</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE3\">班级ID</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE4\">专业ID</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE4\">院系ID</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE4\">联系电话</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"200\" bgcolor=\"\">\r\n");
out.write(" <div align=\"center\" class=\"STYLE4\">邮箱</div>\r\n");
out.write(" </td>\r\n");
out.write(" ");
while (studentListIterator.hasNext()) {
student = (StudentBean) studentListIterator.next();
out.write("\r\n");
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td align=\"center\">");
out.print(student.getStudent_ID() );
out.write(" </td>\r\n");
out.write(" <td align=\"center\">");
out.print(student.getStudent_Name() );
out.write(" </td>\r\n");
out.write(" ");
try {
studentbean = studentData.getStudentByclaId(student.getStudent_ID());
classname = studentbean.getClassinfo().getClass_Name();
}
catch (Exception e) {
}
out.write("\r\n");
out.write(" <td align=\"center\">");
out.print(classname );
out.write(" </td>\r\n");
out.write(" ");
try {
studentbean = studentData.getStudentByMajId(student.getStudent_ID());
majorname = studentbean.getMajor().getMajor_Name();
}
catch (Exception e) {
}
out.write("\r\n");
out.write(" <td align=\"center\">");
out.print(majorname );
out.write(" </td>\r\n");
out.write(" ");
try {
studentbean = studentData.getStudentByDepId(student.getStudent_ID());
depname = studentbean.getDepartments().getDepartments_Name();
}
catch (Exception e) {
}
out.write("\r\n");
out.write(" <td align=\"center\">");
out.print(depname );
out.write(" </td>\r\n");
out.write(" <td align=\"center\">");
out.print(student.getStudent_Tel() );
out.write(" </td>\r\n");
out.write(" <td align=\"center\">");
out.print(student.getStudent_Email() );
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
studentData.finalize();
out.write("\r\n");
out.write(" </table>\r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -