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

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 chakan11_0002ejsp_jsp extends HttpJspBase {
  9.     // begin [file="/chakan11.jsp";from=(5,0);to=(5,57)]
  10.     // end
  11.     static {
  12.     }
  13.     public chakan11_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="/chakan11.jsp";from=(0,48);to=(1,0)]
  46.                 out.write("rn");
  47.             // end
  48.             // HTML // begin [file="/chakan11.jsp";from=(1,31);to=(2,0)]
  49.                 out.write("rn");
  50.             // end
  51.             // HTML // begin [file="/chakan11.jsp";from=(2,27);to=(3,0)]
  52.                 out.write("rn");
  53.             // end
  54.             // HTML // begin [file="/chakan11.jsp";from=(3,32);to=(4,0)]
  55.                 out.write("rn");
  56.             // end
  57.             // HTML // begin [file="/chakan11.jsp";from=(4,30);to=(5,0)]
  58.                 out.write("rn");
  59.             // end
  60.             // begin [file="/chakan11.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="/chakan11.jsp";from=(5,0);to=(5,57)]
  81.                 }
  82.             // end
  83.             // HTML // begin [file="/chakan11.jsp";from=(5,57);to=(16,28)]
  84.                 out.write("rn<html>rn<head>rn<script language="javascript">rn  function a(){alert("修改成功");history.back();}rn</script>rn<title>rnchakan1_1_1rn</title>rn</head>rn<body bgcolor="#ffffff">rn<br /> 学号:<font color="red">");
  85.             // end
  86.             // begin [file="/chakan11.jsp";from=(16,31);to=(16,62)]
  87.                 out.print(session.getAttribute("stu_id") );
  88.             // end
  89.             // HTML // begin [file="/chakan11.jsp";from=(16,64);to=(16,105)]
  90.                 out.write("</font>&nbsp;&nbsp;课程号:<font color="red">");
  91.             // end
  92.             // begin [file="/chakan11.jsp";from=(16,108);to=(16,135)]
  93.                 out.print(request.getParameter("id") );
  94.             // end
  95.             // HTML // begin [file="/chakan11.jsp";from=(16,137);to=(17,5)]
  96.                 out.write("</font>&nbsp;&nbsp;修改学生成绩:<br><br><hr>rn     ");
  97.             // end
  98.             // begin [file="/chakan11.jsp";from=(17,7);to=(27,5)]
  99.                 
  100.                         String stu_id=(String)session.getAttribute("stu_id");
  101.                         String kechenghao=request.getParameter("id");
  102.                         String sql="";
  103.                         sql="SELECT * FROM 成绩关联 where stu_id='"+stu_id+"' and 课程号='"+kechenghao+"'";
  104.                         ResultSet rs=a.executeQuery(sql);
  105.                         if(rs.next()){
  106.                           String cj=rs.getString("成绩");
  107.                           String cj2=rs.getString("重修成绩");
  108.                 
  109.                      
  110.             // end
  111.             // HTML // begin [file="/chakan11.jsp";from=(27,7);to=(31,69)]
  112.                 out.write("rnrn   <form action="chakan111.jsp" method="POST">rn      <center>rn        <br><br>原始成绩:&nbsp;&nbsp;<input type="text" name="cj" value="");
  113.             // end
  114.             // begin [file="/chakan11.jsp";from=(31,72);to=(31,74)]
  115.                 out.print(cj);
  116.             // end
  117.             // HTML // begin [file="/chakan11.jsp";from=(31,76);to=(32,66)]
  118.                 out.write("">rn     <br> <br><br>重修成绩:&nbsp;<input type="text" name="cj2" value="");
  119.             // end
  120.             // begin [file="/chakan11.jsp";from=(32,69);to=(32,72)]
  121.                 out.print(cj2);
  122.             // end
  123.             // HTML // begin [file="/chakan11.jsp";from=(32,74);to=(37,1)]
  124.                 out.write("">rn        <br><br /><br>rn        <input type="submit" name="subit" value="确认" onclick="return a()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value="重写">rn      </center>rn   </form>rn ");
  125.             // end
  126.             // begin [file="/chakan11.jsp";from=(37,3);to=(40,1)]
  127.                 }
  128.                       session.setAttribute("stu_id",stu_id);
  129.                       session.setAttribute("kechenghao",kechenghao);
  130.                  
  131.             // end
  132.             // HTML // begin [file="/chakan11.jsp";from=(40,3);to=(43,0)]
  133.                 out.write("rn</body>rn</html>rn");
  134.             // end
  135.         } catch (Throwable t) {
  136.             if (out != null && out.getBufferSize() != 0)
  137.                 out.clearBuffer();
  138.             if (pageContext != null) pageContext.handlePageException(t);
  139.         } finally {
  140.             if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  141.         }
  142.     }
  143. }