update_0005fform_0002ejsp_jsp.java
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:6k
源码类别:
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_0005fform_0002ejsp_jsp extends HttpJspBase {
- static {
- }
- public update_0005fform_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=GBK");
- 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_form.jsp";from=(0,48);to=(1,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update_form.jsp";from=(1,31);to=(2,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update_form.jsp";from=(2,27);to=(3,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/update_form.jsp";from=(3,41);to=(33,0)]
- out.write("rn<HTML>rn<HEAD>rn<TITLE>update_form</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<table width="90%" align="center">rn <tr>rn <td height="10"></td>rn </tr>rn <tr>rn <td align="center"><font color="green" size="5">请修改你的密码</font></td>rn </tr>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>rn</table>rnrnrn<CENTER>rn");
- // end
- // begin [file="/update_form.jsp";from=(33,2);to=(39,0)]
- Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //载入驱动程序类别
- Connection con = DriverManager.getConnection("jdbc:odbc:dsn112"); //建立数据库链接
- Statement stmt = con.createStatement(); //建立Statement对象
- ResultSet rs; //建立ResultSet(结果集)对象
- rs = stmt.executeQuery("SELECT * FROM admin WHERE name='"+ISOtoGb2312.convert( request.getParameter("name")) +"'"); //执行SQL语句
- // end
- // HTML // begin [file="/update_form.jsp";from=(39,2);to=(41,1)]
- out.write("rn<TABLE width="90%" border="1" bordercolor="#CC9966">rnt");
- // end
- // begin [file="/update_form.jsp";from=(41,3);to=(45,2)]
- //利用while循环将数据表中的记录列出
- while (rs.next())
- {
- // end
- // HTML // begin [file="/update_form.jsp";from=(45,4);to=(50,112)]
- out.write("rn <form method="post" action="update.jsp" name="form1">rnrnrnt <tr>rnt <td height="20"> 姓 名:</td><td><input type="text" name="name" size="20" value="");
- // end
- // begin [file="/update_form.jsp";from=(50,115);to=(50,130)]
- out.print(rs.getString(1));
- // end
- // HTML // begin [file="/update_form.jsp";from=(50,132);to=(54,119)]
- out.write(""></td>rnt </tr>rnrn t <tr>rnt <td height="20"> 密 码:</td><td><input type="text" name="ad_password" size="40" value="");
- // end
- // begin [file="/update_form.jsp";from=(54,122);to=(54,138)]
- out.print(rs.getString(7) );
- // end
- // HTML // begin [file="/update_form.jsp";from=(54,140);to=(63,2)]
- out.write(""></td>rnt </tr>rnrnt <tr>rnt <td></td><td><input type="submit" value="确定" onclick="return a()"> rntt </td>rnt </tr>rn <tr><td height="10"></td></tr>rn</form>rntt");
- // end
- // begin [file="/update_form.jsp";from=(63,4);to=(68,1)]
- }
- rs.close(); //关闭ResultSet对象
- stmt.close(); //关闭Statement对象
- con.close(); //关闭Connection对象
- // end
- // HTML // begin [file="/update_form.jsp";from=(68,3);to=(74,0)]
- out.write("rn</table>rnrn</CENTER>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);
- }
- }
- }