update_0005fstumessage_0002ejsp_jsp.java
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:8k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- import java.sql.*;
- import proj112.ISOtoGb2312;
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import org.apache.jasper.runtime.*;
- public class update_0005fstumessage_0002ejsp_jsp extends HttpJspBase {
- static {
- }
- public update_0005fstumessage_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=GB2312");
- pageContext = _jspxFactory.getPageContext(this, request, response,
- "", true, 8192, true);
- application = pageContext.getServletContext();
- config = pageContext.getServletConfig();
- session = pageContext.getSession();
- out = pageContext.getOut();
- // HTML // begin [file="/update_stumessage.jsp";from=(0,51);to=(1,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(1,32);to=(2,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(2,28);to=(3,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(3,41);to=(13,0)]
- 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");
- // end
- // begin [file="/update_stumessage.jsp";from=(13,2);to=(30,0)]
- String stu_id=ISOtoGb2312.convert(request.getParameter("stu_id"));
- String name=ISOtoGb2312.convert(request.getParameter("name"));
- String sex=ISOtoGb2312.convert(request.getParameter("sex"));
- String age=ISOtoGb2312.convert(request.getParameter("age"));
- String dept=ISOtoGb2312.convert(request.getParameter("dept"));
- String ruxdate=ISOtoGb2312.convert(request.getParameter("ruxdate"));
- String tel=ISOtoGb2312.convert(request.getParameter("tel"));
- String address=ISOtoGb2312.convert(request.getParameter("address"));
- Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //载入驱动程序类别
- Connection con = DriverManager.getConnection("jdbc:odbc:dsn112"); //建立数据库链接
- Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
- ResultSet.CONCUR_READ_ONLY);
- String strsql;
- strsql="update Info set name ='"+name+"',sex ='"+sex+"',age ='"+age+"',dept ='"+dept+"',ruxdate ='"+ruxdate+"',tel ='"+tel+"',address ='"+address+"' where stu_id ='"+stu_id+"'";
- stmt.executeUpdate(strsql);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(30,2);to=(37,48)]
- 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"> 学 号:");
- // end
- // begin [file="/update_stumessage.jsp";from=(37,51);to=(37,57)]
- out.print(stu_id);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(37,59);to=(40,48)]
- out.write("</td>rn </tr>rn <tr>rn <td height="30"> 用户名:");
- // end
- // begin [file="/update_stumessage.jsp";from=(40,51);to=(40,55)]
- out.print(name);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(40,57);to=(43,35)]
- out.write("</td>rn </tr>rn <tr>rn <td> 性别:");
- // end
- // begin [file="/update_stumessage.jsp";from=(43,38);to=(43,41)]
- out.print(sex);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(43,43);to=(46,35)]
- out.write("</td>rn </tr>rn <tr>rn <td> 年龄:");
- // end
- // begin [file="/update_stumessage.jsp";from=(46,38);to=(46,41)]
- out.print(age);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(46,43);to=(49,35)]
- out.write("</td>rn </tr>rn <tr>rn <td> 专业:");
- // end
- // begin [file="/update_stumessage.jsp";from=(49,38);to=(49,42)]
- out.print(dept);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(49,44);to=(52,37)]
- out.write("</td>rn </tr>rn <tr>rn <td> 入学时间:");
- // end
- // begin [file="/update_stumessage.jsp";from=(52,40);to=(52,47)]
- out.print(ruxdate);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(52,49);to=(55,37)]
- out.write("</td>rn </tr>rn <tr>rn <td> 联系方式:");
- // end
- // begin [file="/update_stumessage.jsp";from=(55,40);to=(55,47)]
- out.print(address);
- // end
- // HTML // begin [file="/update_stumessage.jsp";from=(55,49);to=(78,0)]
- out.write("</td>rn </tr>rnrnrn <tr>rn <td align="center"> <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");
- // 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);
- }
- }
- }