update_0002ejsp_jsp.java
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:5k
源码类别:
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_0002ejsp_jsp extends HttpJspBase {
- static {
- }
- public update_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.jsp";from=(0,51);to=(1,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update.jsp";from=(1,32);to=(2,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update.jsp";from=(2,28);to=(3,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update.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.jsp";from=(13,2);to=(25,0)]
- String name=ISOtoGb2312.convert(request.getParameter("name"));
- String ad_password=ISOtoGb2312.convert(request.getParameter("ad_password"));
- 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 admin set ad_password ='"+ad_password+"' where name ='"+name+"'";
- stmt.executeUpdate(strsql);
- // end
- // HTML // begin [file="/update.jsp";from=(25,2);to=(32,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.jsp";from=(32,51);to=(32,55)]
- out.print(name);
- // end
- // HTML // begin [file="/update.jsp";from=(32,57);to=(36,49)]
- out.write("</td>rn </tr>rnrn <tr>rn <td height="30"> 密 码:");
- // end
- // begin [file="/update.jsp";from=(36,52);to=(36,63)]
- out.print(ad_password);
- // end
- // HTML // begin [file="/update.jsp";from=(36,65);to=(59,0)]
- out.write("</td>rn </tr>rnrnrn <tr>rn <td align="center"> <a href="update_ad_pwd.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);
- }
- }
- }