kecheng3_0002ejsp_jsp.java
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:9k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- import java.sql.*;
- import java.util.*;
- import proj112.*;
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import org.apache.jasper.runtime.*;
- public class kecheng3_0002ejsp_jsp extends HttpJspBase {
- // begin [file="/kecheng3.jsp";from=(5,0);to=(5,57)]
- // end
- static {
- }
- public kecheng3_0002ejsp_jsp( ) {
- }
- private static boolean _jspx_inited = false;
- public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
- }
- 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;
- String _value = null;
- try {
- if (_jspx_inited == false) {
- synchronized (this) {
- if (_jspx_inited == false) {
- _jspx_init();
- _jspx_inited = true;
- }
- }
- }
- _jspxFactory = JspFactory.getDefaultFactory();
- response.setContentType("text/html; charset=GBK");
- pageContext = _jspxFactory.getPageContext(this, request, response,
- "", true, 8192, true);
- application = pageContext.getServletContext();
- config = pageContext.getServletConfig();
- session = pageContext.getSession();
- out = pageContext.getOut();
- // HTML // begin [file="/kecheng3.jsp";from=(0,48);to=(1,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(1,31);to=(2,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(2,27);to=(3,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(3,32);to=(4,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(4,30);to=(5,0)]
- out.write("rn");
- // end
- // begin [file="/kecheng3.jsp";from=(5,0);to=(5,57)]
- proj112.dbconn a = null;
- boolean _jspx_speciala = false;
- synchronized (pageContext) {
- a= (proj112.dbconn)
- pageContext.getAttribute("a",PageContext.PAGE_SCOPE);
- if ( a == null ) {
- _jspx_speciala = true;
- try {
- a = (proj112.dbconn) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "proj112.dbconn");
- } catch (ClassNotFoundException exc) {
- throw new InstantiationException(exc.getMessage());
- } catch (Exception exc) {
- throw new ServletException (" Cannot create bean of class "+"proj112.dbconn", exc);
- }
- pageContext.setAttribute("a", a, PageContext.PAGE_SCOPE);
- }
- }
- if(_jspx_speciala == true) {
- // end
- // begin [file="/kecheng3.jsp";from=(5,0);to=(5,57)]
- }
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(5,57);to=(18,52)]
- 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 姓名: <font color="#0033FF">");
- // end
- // begin [file="/kecheng3.jsp";from=(18,55);to=(18,88)]
- out.print(session.getAttribute("stu_name") );
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(18,90);to=(18,151)]
- out.write(" </font> 学号: <font color="#0033FF">");
- // end
- // begin [file="/kecheng3.jsp";from=(18,154);to=(18,181)]
- out.print(session.getAttribute("id") );
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(18,183);to=(21,3)]
- out.write("</font><br>rn <hr><br>rn <font color="red"> 你选择的课程如下:<br>rn ");
- // end
- // begin [file="/kecheng3.jsp";from=(21,5);to=(26,39)]
- request.setCharacterEncoding("GBK");
- String stu_id=(String)session.getAttribute("id");
- String sql="";
- sql="SELECT * FROM 选课关联,kecheng where 选课关联.kch=kecheng.kch and 选课关联.stu_id='"+stu_id+"'";
- ResultSet rs=a.executeQuery(sql);
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(26,41);to=(39,6)]
- 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 ");
- // end
- // begin [file="/kecheng3.jsp";from=(39,8);to=(40,7)]
- while(rs.next())
- {
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(40,9);to=(42,52)]
- out.write("rn <tr>rn <td align="center"><a href="kecheng4.jsp?id3=");
- // end
- // begin [file="/kecheng3.jsp";from=(42,55);to=(42,74)]
- out.print(rs.getString("kch"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(42,76);to=(43,26)]
- out.write("" onclick="return a()" >删除</a></td>rn <td align="center">");
- // end
- // begin [file="/kecheng3.jsp";from=(43,29);to=(43,48)]
- out.print(rs.getString("kch"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(43,50);to=(44,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/kecheng3.jsp";from=(44,29);to=(44,48)]
- out.print(rs.getString("kcm"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(44,50);to=(45,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/kecheng3.jsp";from=(45,29);to=(45,49)]
- out.print(rs.getString("rkjs"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(45,51);to=(46,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/kecheng3.jsp";from=(46,29);to=(46,48)]
- out.print(rs.getString("xqj"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(46,50);to=(47,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/kecheng3.jsp";from=(47,29);to=(47,47)]
- out.print(rs.getString("sj"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(47,49);to=(48,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/kecheng3.jsp";from=(48,29);to=(48,49)]
- out.print(rs.getString("skjs"));
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(48,51);to=(50,4)]
- out.write("</td>rn </tr>rn ");
- // end
- // begin [file="/kecheng3.jsp";from=(50,6);to=(50,8)]
- }
- // end
- // HTML // begin [file="/kecheng3.jsp";from=(50,10);to=(55,0)]
- out.write("rn </table>rnrn</body>rnrn");
- // end
- } catch (Throwable t) {
- if (out != null && out.getBufferSize() != 0)
- out.clearBuffer();
- if (pageContext != null) pageContext.handlePageException(t);
- } finally {
- if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
- }
- }
- }