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

📄 displaycourse_jsp.java

📁 我用的是jsp+javabean+serverlet实现的学生管理系统
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;

public final class DisplayCourse_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.List _jspx_dependants;

  public Object 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,
      			"errorpage.jsp", 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\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"><title>选报课程</title>\r\n");
      out.write("</head>\r\n");
      ld.checkEnrol check = null;
      synchronized (_jspx_page_context) {
        check = (ld.checkEnrol) _jspx_page_context.getAttribute("check", PageContext.PAGE_SCOPE);
        if (check == null){
          check = new ld.checkEnrol();
          _jspx_page_context.setAttribute("check", check, PageContext.PAGE_SCOPE);
        }
      }
      out.write("\r\n");
      out.write("<body bgcolor=\"#0099FF\" text=\"#FFFFFF\" link=\"#00FF00\" >\r\n");
      out.write("<p align=\"center\"><font color=\"#00FF00\" size=\"+3\" face=\"方正舒体\">您可以选报的课程为 </font></p>\r\n");
      out.write("<table border=\"1\" align=\"center\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"54\">课程号</td>\r\n");
      out.write("    <td width=\"54\">课程名</td>\r\n");
      out.write("    <td width=\"57\">预修课</td>\r\n");
      out.write("    <td width=\"58\">系别</td>\r\n");
      out.write("    <td width=\"59\">班级号</td>\r\n");
      out.write("    <td width=\"69\">教室号</td>\r\n");
      out.write("    <td width=\"88\">上课时间</td>\r\n");
      out.write("\t <td width=\"88\">教师</td>\r\n");
      out.write("    <td width=\"83\">选择</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <p> \r\n");
      out.write("    ");

String id = (String)session.getAttribute("id");
String cour_id,name,dep,prepare,class_id,room_id,cour_time;
String tea_name=null;
ResultSet rs=null;
rs=check.getCourse(id);
while(rs.next()){
cour_id=rs.getString("id");
name=rs.getString("name");
prepare=rs.getString("prepare");
dep=rs.getString("dep");
class_id=rs.getString("class_id");
room_id=rs.getString("room_id");
cour_time=rs.getString("cour_time");
tea_name=rs.getString("tea_name");

      out.write("\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td>");
      out.print(cour_id);
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print(name);
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print(prepare);
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print(dep);
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print(class_id);
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print(room_id);
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print(cour_time);
      out.write("</td>\r\n");
      out.write("\t<td>");
      out.print(tea_name);
      out.write("</td>\r\n");
      out.write("    <td><a href=\"StudentLoginSvlt?action=enrol&id=");
      out.print(id);
      out.write("&cour_id=");
      out.print(cour_id);
      out.write("&class_id=");
      out.print(class_id);
      out.write("&prepare=");
      out.print(prepare);
      out.write("  \">注册</a> \r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  ");

}

      out.write("\r\n");
      out.write("</table>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p><a href=\"student.jsp\"></p> &lt;&lt;Back </a> </p>\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 + -