kecheng3_0002ejsp_jsp.java
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:9k
源码类别:

Jsp/Servlet

开发平台:

VBScript

  1. import java.sql.*;
  2. import java.util.*;
  3. import proj112.*;
  4. import javax.servlet.*;
  5. import javax.servlet.http.*;
  6. import javax.servlet.jsp.*;
  7. import org.apache.jasper.runtime.*;
  8. public class kecheng3_0002ejsp_jsp extends HttpJspBase {
  9.     // begin [file="/kecheng3.jsp";from=(5,0);to=(5,57)]
  10.     // end
  11.     static {
  12.     }
  13.     public kecheng3_0002ejsp_jsp( ) {
  14.     }
  15.     private static boolean _jspx_inited = false;
  16.     public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
  17.     }
  18.     public void _jspService(HttpServletRequest request, HttpServletResponse  response)
  19.         throws java.io.IOException, ServletException {
  20.         JspFactory _jspxFactory = null;
  21.         PageContext pageContext = null;
  22.         HttpSession session = null;
  23.         ServletContext application = null;
  24.         ServletConfig config = null;
  25.         JspWriter out = null;
  26.         Object page = this;
  27.         String  _value = null;
  28.         try {
  29.             if (_jspx_inited == false) {
  30.                 synchronized (this) {
  31.                     if (_jspx_inited == false) {
  32.                         _jspx_init();
  33.                         _jspx_inited = true;
  34.                     }
  35.                 }
  36.             }
  37.             _jspxFactory = JspFactory.getDefaultFactory();
  38.             response.setContentType("text/html; charset=GBK");
  39.             pageContext = _jspxFactory.getPageContext(this, request, response,
  40.              "", true, 8192, true);
  41.             application = pageContext.getServletContext();
  42.             config = pageContext.getServletConfig();
  43.             session = pageContext.getSession();
  44.             out = pageContext.getOut();
  45.             // HTML // begin [file="/kecheng3.jsp";from=(0,48);to=(1,0)]
  46.                 out.write("rn");
  47.             // end
  48.             // HTML // begin [file="/kecheng3.jsp";from=(1,31);to=(2,0)]
  49.                 out.write("rn");
  50.             // end
  51.             // HTML // begin [file="/kecheng3.jsp";from=(2,27);to=(3,0)]
  52.                 out.write("rn");
  53.             // end
  54.             // HTML // begin [file="/kecheng3.jsp";from=(3,32);to=(4,0)]
  55.                 out.write("rn");
  56.             // end
  57.             // HTML // begin [file="/kecheng3.jsp";from=(4,30);to=(5,0)]
  58.                 out.write("rn");
  59.             // end
  60.             // begin [file="/kecheng3.jsp";from=(5,0);to=(5,57)]
  61.                 proj112.dbconn a = null;
  62.                 boolean _jspx_speciala  = false;
  63.                  synchronized (pageContext) {
  64.                     a= (proj112.dbconn)
  65.                     pageContext.getAttribute("a",PageContext.PAGE_SCOPE);
  66.                     if ( a == null ) {
  67.                         _jspx_speciala = true;
  68.                         try {
  69.                             a = (proj112.dbconn) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "proj112.dbconn");
  70.                         } catch (ClassNotFoundException exc) {
  71.                              throw new InstantiationException(exc.getMessage());
  72.                         } catch (Exception exc) {
  73.                              throw new ServletException (" Cannot create bean of class "+"proj112.dbconn", exc);
  74.                         }
  75.                         pageContext.setAttribute("a", a, PageContext.PAGE_SCOPE);
  76.                     }
  77.                  } 
  78.                 if(_jspx_speciala == true) {
  79.             // end
  80.             // begin [file="/kecheng3.jsp";from=(5,0);to=(5,57)]
  81.                 }
  82.             // end
  83.             // HTML // begin [file="/kecheng3.jsp";from=(5,57);to=(18,52)]
  84.                 out.write("rn<html>rn<head>rn<script language="javascript">rn  function a(){rn      alert("删除成功");rn    }rn  </script>rn<title>rnkecheng2rn</title>rn</head>rn<body bgcolor="#ffffff">rn &nbsp; &nbsp; &nbsp;姓名:&nbsp;<font color="#0033FF">");
  85.             // end
  86.             // begin [file="/kecheng3.jsp";from=(18,55);to=(18,88)]
  87.                 out.print(session.getAttribute("stu_name") );
  88.             // end
  89.             // HTML // begin [file="/kecheng3.jsp";from=(18,90);to=(18,151)]
  90.                 out.write(" </font>  &nbsp; &nbsp; &nbsp;学号:&nbsp;<font color="#0033FF">");
  91.             // end
  92.             // begin [file="/kecheng3.jsp";from=(18,154);to=(18,181)]
  93.                 out.print(session.getAttribute("id") );
  94.             // end
  95.             // HTML // begin [file="/kecheng3.jsp";from=(18,183);to=(21,3)]
  96.                 out.write("</font><br>rn <hr><br>rn    &nbsp; &nbsp;<font color="red"> 你选择的课程如下:<br>rn   ");
  97.             // end
  98.             // begin [file="/kecheng3.jsp";from=(21,5);to=(26,39)]
  99.                 
  100.                       request.setCharacterEncoding("GBK");
  101.                       String stu_id=(String)session.getAttribute("id");
  102.                       String sql="";
  103.                       sql="SELECT * FROM 选课关联,kecheng where 选课关联.kch=kecheng.kch and 选课关联.stu_id='"+stu_id+"'";
  104.                       ResultSet rs=a.executeQuery(sql);
  105.             // end
  106.             // HTML // begin [file="/kecheng3.jsp";from=(26,41);to=(39,6)]
  107.                 out.write("rnrn     <p align="center">rn      <table  width="100%" cellspacing="0" cellpadding="4" rules="all" bordercolor="#CC9966" border="1" id="dg_rxkb" style="background-color:White;border-color:#CC9966;border-width:1px;border-style:None;width:100%;border-collapse:collapse;">rn        <tr>rn          <td align="center"><font color="#6633CC">删除</font></td>rn          <td align="center"><font color="#6633CC">课程号</font></td>rn          <td align="center"><font color="#6633CC">课程名</font></td>rn          <td align="center"><font color="#6633CC">任课教师</font></td>rn          <td align="center"><font color="#6633CC">星期几</font></td>rn          <td align="center"><font color="#6633CC">时间</font></td>rn          <td align="center"><font color="#6633CC">上课教室</font></td>rn      </tr>rn      ");
  108.             // end
  109.             // begin [file="/kecheng3.jsp";from=(39,8);to=(40,7)]
  110.                  while(rs.next())
  111.                      { 
  112.             // end
  113.             // HTML // begin [file="/kecheng3.jsp";from=(40,9);to=(42,52)]
  114.                 out.write("rn     <tr>rn       <td align="center"><a href="kecheng4.jsp?id3=");
  115.             // end
  116.             // begin [file="/kecheng3.jsp";from=(42,55);to=(42,74)]
  117.                 out.print(rs.getString("kch"));
  118.             // end
  119.             // HTML // begin [file="/kecheng3.jsp";from=(42,76);to=(43,26)]
  120.                 out.write("" onclick="return a()" >删除</a></td>rn       <td align="center">");
  121.             // end
  122.             // begin [file="/kecheng3.jsp";from=(43,29);to=(43,48)]
  123.                 out.print(rs.getString("kch"));
  124.             // end
  125.             // HTML // begin [file="/kecheng3.jsp";from=(43,50);to=(44,26)]
  126.                 out.write("</td>rn       <td align="center">");
  127.             // end
  128.             // begin [file="/kecheng3.jsp";from=(44,29);to=(44,48)]
  129.                 out.print(rs.getString("kcm"));
  130.             // end
  131.             // HTML // begin [file="/kecheng3.jsp";from=(44,50);to=(45,26)]
  132.                 out.write("</td>rn       <td align="center">");
  133.             // end
  134.             // begin [file="/kecheng3.jsp";from=(45,29);to=(45,49)]
  135.                 out.print(rs.getString("rkjs"));
  136.             // end
  137.             // HTML // begin [file="/kecheng3.jsp";from=(45,51);to=(46,26)]
  138.                 out.write("</td>rn       <td align="center">");
  139.             // end
  140.             // begin [file="/kecheng3.jsp";from=(46,29);to=(46,48)]
  141.                 out.print(rs.getString("xqj"));
  142.             // end
  143.             // HTML // begin [file="/kecheng3.jsp";from=(46,50);to=(47,26)]
  144.                 out.write("</td>rn       <td align="center">");
  145.             // end
  146.             // begin [file="/kecheng3.jsp";from=(47,29);to=(47,47)]
  147.                 out.print(rs.getString("sj"));
  148.             // end
  149.             // HTML // begin [file="/kecheng3.jsp";from=(47,49);to=(48,26)]
  150.                 out.write("</td>rn       <td align="center">");
  151.             // end
  152.             // begin [file="/kecheng3.jsp";from=(48,29);to=(48,49)]
  153.                 out.print(rs.getString("skjs"));
  154.             // end
  155.             // HTML // begin [file="/kecheng3.jsp";from=(48,51);to=(50,4)]
  156.                 out.write("</td>rn     </tr>rn    ");
  157.             // end
  158.             // begin [file="/kecheng3.jsp";from=(50,6);to=(50,8)]
  159.                 } 
  160.             // end
  161.             // HTML // begin [file="/kecheng3.jsp";from=(50,10);to=(55,0)]
  162.                 out.write("rn    </table>rnrn</body>rnrn");
  163.             // end
  164.         } catch (Throwable t) {
  165.             if (out != null && out.getBufferSize() != 0)
  166.                 out.clearBuffer();
  167.             if (pageContext != null) pageContext.handlePageException(t);
  168.         } finally {
  169.             if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  170.         }
  171.     }
  172. }