⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 displaystudentjsp_jsp.java

📁 教材管理系统
💻 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<html>\r\n<head>\r\n<title>DisplayStudentJsp</title>\r\n</head>\r\n<body bgcolor=\"#FFFFFF\">\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "StudentMainFrame.jsp", out, true);
      out.write("\r\n<br>\r\n<table width=\"90%\" style=\"height=2%\" border=\"0\" align=\"center\" cellpadding=\"4\" cellspacing=\"2\">\r\n  <tr bgcolor=\"#333333\">\r\n    <td height=\"22\" bgcolor=\"#FFFFCC\">\r\n      <font color=\"#000000\">\r\n        <strong>学生信息</strong>\r\n      </font>\r\n    </td>\r\n  </tr>\r\n  <table width=100% style=\"height:5%\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\r\n  ");


    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    <tr>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE4\">学号</div>\r\n      </td>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE4\">姓名</div>\r\n      </td>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE3\">班级ID</div>\r\n      </td>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE4\">专业ID</div>\r\n      </td>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE4\">院系ID</div>\r\n      </td>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE4\">联系电话</div>\r\n      </td>\r\n      <td width=\"200\" bgcolor=\"\">\r\n        <div align=\"center\" class=\"STYLE4\">邮箱</div>\r\n      </td>\r\n    ");

      while (studentListIterator.hasNext()) {
        student = (StudentBean) studentListIterator.next();
    
      out.write("\r\n\r\n    <tr>\r\n      <td align=\"center\">");
      out.print(student.getStudent_ID() );
      out.write("      </td>\r\n      <td align=\"center\">");
      out.print(student.getStudent_Name() );
      out.write("      </td>\r\n    ");

      try {
        studentbean = studentData.getStudentByclaId(student.getStudent_ID());
        classname = studentbean.getClassinfo().getClass_Name();
      }
      catch (Exception e) {
      }
    
      out.write("\r\n      <td align=\"center\">");
      out.print(classname );
      out.write("      </td>\r\n    ");

      try {
        studentbean = studentData.getStudentByMajId(student.getStudent_ID());
        majorname = studentbean.getMajor().getMajor_Name();
      }
      catch (Exception e) {
      }
    
      out.write("\r\n      <td align=\"center\">");
      out.print(majorname );
      out.write("      </td>\r\n    ");

      try {
        studentbean = studentData.getStudentByDepId(student.getStudent_ID());
        depname = studentbean.getDepartments().getDepartments_Name();
      }
      catch (Exception e) {
      }
    
      out.write("\r\n      <td align=\"center\">");
      out.print(depname );
      out.write("      </td>\r\n      <td align=\"center\">");
      out.print(student.getStudent_Tel() );
      out.write("      </td>\r\n      <td align=\"center\">");
      out.print(student.getStudent_Email() );
      out.write("      </td>\r\n    </tr>\r\n  ");

    }
        studentData.finalize();
  
      out.write("\r\n  </table>\r\n\r\n</body>\r\n</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 + -