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

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 change_0002ejsp_jsp extends HttpJspBase {
  9.     // begin [file="/change.jsp";from=(5,0);to=(5,57)]
  10.     // end
  11.     static {
  12.     }
  13.     public change_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="/change.jsp";from=(0,48);to=(1,0)]
  46.                 out.write("rn");
  47.             // end
  48.             // HTML // begin [file="/change.jsp";from=(1,31);to=(2,0)]
  49.                 out.write("rn");
  50.             // end
  51.             // HTML // begin [file="/change.jsp";from=(2,27);to=(3,0)]
  52.                 out.write("rn");
  53.             // end
  54.             // HTML // begin [file="/change.jsp";from=(3,32);to=(4,0)]
  55.                 out.write("rn");
  56.             // end
  57.             // HTML // begin [file="/change.jsp";from=(4,30);to=(5,0)]
  58.                 out.write("rn");
  59.             // end
  60.             // begin [file="/change.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="/change.jsp";from=(5,0);to=(5,57)]
  81.                 }
  82.             // end
  83.             // HTML // begin [file="/change.jsp";from=(5,57);to=(10,2)]
  84.                 out.write("rn<html>rn<body>rnrnrn  ");
  85.             // end
  86.             // begin [file="/change.jsp";from=(10,4);to=(10,42)]
  87.                  request.setCharacterEncoding("GBK"); 
  88.             // end
  89.             // HTML // begin [file="/change.jsp";from=(10,44);to=(20,2)]
  90.                 out.write("rn<head>rn<title>rn修改学生信息rn</title>rn</head>rnrn<FORM Action="edit.jsp" Method="post" name="edit">rnrn<table align="center" border="2" width="100%" bordercolorlight="#CC99FF" cellpadding="2" bordercolordark="#FFFFFF" cellspacing="2">rn  ");
  91.             // end
  92.             // begin [file="/change.jsp";from=(20,4);to=(26,21)]
  93.                 
  94.                   String id2=request.getParameter("id");
  95.                 
  96.                   //out.print(id);
  97.                   String sql="select * from student where stu_name='"+id2+"'";
  98.                   ResultSet rs = a.executeQuery(sql);
  99.                   while(rs.next()) { 
  100.             // end
  101.             // HTML // begin [file="/change.jsp";from=(26,23);to=(29,78)]
  102.                 out.write("rn  <tr> <td align=center colspan=2><font color=blue size=5><b>修改学生信息</font></td>rnrn    <tr align=center><td>姓名:</td><td><INPUT TYPE="text" NAME="stu_name" value=");
  103.             // end
  104.             // begin [file="/change.jsp";from=(29,81);to=(29,96)]
  105.                 out.print(rs.getString(1));
  106.             // end
  107.             // HTML // begin [file="/change.jsp";from=(29,98);to=(33,58)]
  108.                 out.write("></td>rnt  </tr>rn  </tr>rn  <tr align=center>rnt  <td>学号:</td><td><INPUT TYPE="text" NAME="stu_id" value=");
  109.             // end
  110.             // begin [file="/change.jsp";from=(33,61);to=(33,76)]
  111.                 out.print(rs.getString(2));
  112.             // end
  113.             // HTML // begin [file="/change.jsp";from=(33,78);to=(36,51)]
  114.                 out.write("></td>rnt </tr>rnt<tr align=center><td>rnt  性别:</td><td><INPUT TYPE="text" NAME="sex" value=");
  115.             // end
  116.             // begin [file="/change.jsp";from=(36,54);to=(36,69)]
  117.                 out.print(rs.getString(4));
  118.             // end
  119.             // HTML // begin [file="/change.jsp";from=(36,71);to=(39,52)]
  120.                 out.write("></td>rnt  </tr>rnt  <tr align=center><td>rnt  专业:</td><td><INPUT TYPE="text" NAME="dept" value=");
  121.             // end
  122.             // begin [file="/change.jsp";from=(39,55);to=(39,70)]
  123.                 out.print(rs.getString(5));
  124.             // end
  125.             // HTML // begin [file="/change.jsp";from=(39,72);to=(42,50)]
  126.                 out.write("></td>rnt  </tr>rnt  <tr align=center><td>rnt  民族:</td><td><INPUT TYPE="text" NAME="mz" value=");
  127.             // end
  128.             // begin [file="/change.jsp";from=(42,53);to=(42,68)]
  129.                 out.print(rs.getString(6));
  130.             // end
  131.             // HTML // begin [file="/change.jsp";from=(42,70);to=(45,54)]
  132.                 out.write("></td>rnt  </tr>rnt  <tr align=center><td>rnt  政治面貌:</td><td><INPUT TYPE="text" NAME="zzmm" value=");
  133.             // end
  134.             // begin [file="/change.jsp";from=(45,57);to=(45,72)]
  135.                 out.print(rs.getString(7));
  136.             // end
  137.             // HTML // begin [file="/change.jsp";from=(45,74);to=(48,2)]
  138.                 out.write("></td>rnt  </tr>rnrn  ");
  139.             // end
  140.             // begin [file="/change.jsp";from=(48,4);to=(48,18)]
  141.                  } rs.close();
  142.             // end
  143.             // HTML // begin [file="/change.jsp";from=(48,20);to=(67,0)]
  144.                 out.write("rnrnrn<tr><td align=center  colspan=2>rnrn<INPUT align=center TYPE="submit" value="提交"> </td>rn</tr>rn</table>rnrn</form>rnrn<br>rn<br>rn<br>rn<br>rn<p align=center>rn<a href="std.jsp";>返回</a> </p>rn</body>rn</html>rn");
  145.             // end
  146.         } catch (Throwable t) {
  147.             if (out != null && out.getBufferSize() != 0)
  148.                 out.clearBuffer();
  149.             if (pageContext != null) pageContext.handlePageException(t);
  150.         } finally {
  151.             if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  152.         }
  153.     }
  154. }