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

Jsp/Servlet

开发平台:

VBScript

  1. import java.sql.*;
  2. import proj112.ISOtoGb2312;
  3. import javax.servlet.*;
  4. import javax.servlet.http.*;
  5. import javax.servlet.jsp.*;
  6. import org.apache.jasper.runtime.*;
  7. public class update_0005fstumessage_0002ejsp_jsp extends HttpJspBase {
  8.     static {
  9.     }
  10.     public update_0005fstumessage_0002ejsp_jsp( ) {
  11.     }
  12.     private static boolean _jspx_inited = false;
  13.     public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
  14.     }
  15.     public void _jspService(HttpServletRequest request, HttpServletResponse  response)
  16.         throws java.io.IOException, ServletException {
  17.         JspFactory _jspxFactory = null;
  18.         PageContext pageContext = null;
  19.         HttpSession session = null;
  20.         ServletContext application = null;
  21.         ServletConfig config = null;
  22.         JspWriter out = null;
  23.         Object page = this;
  24.         String  _value = null;
  25.         try {
  26.             if (_jspx_inited == false) {
  27.                 synchronized (this) {
  28.                     if (_jspx_inited == false) {
  29.                         _jspx_init();
  30.                         _jspx_inited = true;
  31.                     }
  32.                 }
  33.             }
  34.             _jspxFactory = JspFactory.getDefaultFactory();
  35.             response.setContentType("text/html; charset=GB2312");
  36.             pageContext = _jspxFactory.getPageContext(this, request, response,
  37.              "", true, 8192, true);
  38.             application = pageContext.getServletContext();
  39.             config = pageContext.getServletConfig();
  40.             session = pageContext.getSession();
  41.             out = pageContext.getOut();
  42.             // HTML // begin [file="/update_stumessage.jsp";from=(0,51);to=(1,0)]
  43.                 out.write("rn");
  44.             // end
  45.             // HTML // begin [file="/update_stumessage.jsp";from=(1,32);to=(2,0)]
  46.                 out.write("rn");
  47.             // end
  48.             // HTML // begin [file="/update_stumessage.jsp";from=(2,28);to=(3,0)]
  49.                 out.write("rn");
  50.             // end
  51.             // HTML // begin [file="/update_stumessage.jsp";from=(3,41);to=(13,0)]
  52.                 out.write("rn<HTML>rn<HEAD>rn<TITLE>update</TITLE>rn</HEAD>rn<body text="#808080" link="#FF99CC" vlink="#FF8080" alink="#FF99CC" topmargin="0" leftmargin="0"><style>rn<!--rnBODY {SCROLLBAR-FACE-COLOR: #FFFFFF; SCROLLBAR-HIGHLIGHT-COLOR: #FFFFFF; SCROLLBAR-SHADOW-COLOR: #FFFFFF; SCROLLBAR-3DLIGHT-COLOR: #FFFFFF; SCROLLBAR-ARROW-COLOR:  #FFAAAA; SCROLLBAR-TRACK-COLOR: #FFFFFF; SCROLLBAR-DARKSHADOW-COLOR: #FFFFFF; }rn-->rn</style>rn");
  53.             // end
  54.             // begin [file="/update_stumessage.jsp";from=(13,2);to=(30,0)]
  55.                 
  56.                 String stu_id=ISOtoGb2312.convert(request.getParameter("stu_id"));
  57.                 String name=ISOtoGb2312.convert(request.getParameter("name"));
  58.                 String sex=ISOtoGb2312.convert(request.getParameter("sex"));
  59.                 String age=ISOtoGb2312.convert(request.getParameter("age"));
  60.                 String dept=ISOtoGb2312.convert(request.getParameter("dept"));
  61.                 String ruxdate=ISOtoGb2312.convert(request.getParameter("ruxdate"));
  62.                 String tel=ISOtoGb2312.convert(request.getParameter("tel"));
  63.                 String address=ISOtoGb2312.convert(request.getParameter("address"));
  64.                 
  65.                 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //载入驱动程序类别
  66.                 Connection con = DriverManager.getConnection("jdbc:odbc:dsn112"); //建立数据库链接
  67.                 Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
  68.                  ResultSet.CONCUR_READ_ONLY);
  69.                 String strsql;
  70.                 strsql="update Info set name ='"+name+"',sex ='"+sex+"',age ='"+age+"',dept ='"+dept+"',ruxdate ='"+ruxdate+"',tel ='"+tel+"',address ='"+address+"' where stu_id ='"+stu_id+"'";
  71.                 stmt.executeUpdate(strsql);
  72.             // end
  73.             // HTML // begin [file="/update_stumessage.jsp";from=(30,2);to=(37,48)]
  74.                 out.write("rn<br><br><br><br>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:99%;border-collapse:collapse;">rn  <tr>rn    <td bgcolor="#EcEcff" align="center"><h3>你修改了的信息如下:</td>rn  </tr>rn  <tr>rn    <td height="30">&nbsp;&nbsp;&nbsp;&nbsp;学 号:");
  75.             // end
  76.             // begin [file="/update_stumessage.jsp";from=(37,51);to=(37,57)]
  77.                 out.print(stu_id);
  78.             // end
  79.             // HTML // begin [file="/update_stumessage.jsp";from=(37,59);to=(40,48)]
  80.                 out.write("</td>rn  </tr>rn <tr>rn    <td height="30">&nbsp;&nbsp;&nbsp;&nbsp;用户名:");
  81.             // end
  82.             // begin [file="/update_stumessage.jsp";from=(40,51);to=(40,55)]
  83.                 out.print(name);
  84.             // end
  85.             // HTML // begin [file="/update_stumessage.jsp";from=(40,57);to=(43,35)]
  86.                 out.write("</td>rn  </tr>rn  <tr>rn    <td>&nbsp;&nbsp;&nbsp;&nbsp;性别:");
  87.             // end
  88.             // begin [file="/update_stumessage.jsp";from=(43,38);to=(43,41)]
  89.                 out.print(sex);
  90.             // end
  91.             // HTML // begin [file="/update_stumessage.jsp";from=(43,43);to=(46,35)]
  92.                 out.write("</td>rn  </tr>rn  <tr>rn    <td>&nbsp;&nbsp;&nbsp;&nbsp;年龄:");
  93.             // end
  94.             // begin [file="/update_stumessage.jsp";from=(46,38);to=(46,41)]
  95.                 out.print(age);
  96.             // end
  97.             // HTML // begin [file="/update_stumessage.jsp";from=(46,43);to=(49,35)]
  98.                 out.write("</td>rn  </tr>rn  <tr>rn    <td>&nbsp;&nbsp;&nbsp;&nbsp;专业:");
  99.             // end
  100.             // begin [file="/update_stumessage.jsp";from=(49,38);to=(49,42)]
  101.                 out.print(dept);
  102.             // end
  103.             // HTML // begin [file="/update_stumessage.jsp";from=(49,44);to=(52,37)]
  104.                 out.write("</td>rn  </tr>rn  <tr>rn    <td>&nbsp;&nbsp;&nbsp;&nbsp;入学时间:");
  105.             // end
  106.             // begin [file="/update_stumessage.jsp";from=(52,40);to=(52,47)]
  107.                 out.print(ruxdate);
  108.             // end
  109.             // HTML // begin [file="/update_stumessage.jsp";from=(52,49);to=(55,37)]
  110.                 out.write("</td>rn  </tr>rn  <tr>rn    <td>&nbsp;&nbsp;&nbsp;&nbsp;联系方式:");
  111.             // end
  112.             // begin [file="/update_stumessage.jsp";from=(55,40);to=(55,47)]
  113.                 out.print(address);
  114.             // end
  115.             // HTML // begin [file="/update_stumessage.jsp";from=(55,49);to=(78,0)]
  116.                 out.write("</td>rn  </tr>rnrnrn  <tr>rn    <td  align="center">&nbsp;&nbsp;&nbsp;&nbsp;<a href="change.jsp">返回</a></td>rn  </tr>rnrn</table>rn<TABLE border="0" width="90%" align="center">rn       <tr>rn         <td height="10"></td>rn       </tr>rn       <tr>rn         <td align="center"></td>rn       </tr>rn       <tr>rn         <td height="10"></td>rn       </tr>rnrn</table>rn</BODY>rn</HTML>rn");
  117.             // end
  118.         } catch (Throwable t) {
  119.             if (out != null && out.getBufferSize() != 0)
  120.                 out.clearBuffer();
  121.             if (pageContext != null) pageContext.handlePageException(t);
  122.         } finally {
  123.             if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  124.         }
  125.     }
  126. }