comm_update_p.jsp
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:1k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <jsp:useBean id="customerBean" class="MyFly.Bean.customerBean" scope="request"/>
  3. <jsp:useBean id="loginBean" class="MyFly.Bean.loginBean" scope="request"/>
  4. <%
  5. request.setCharacterEncoding("gb2312");
  6. %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  11. <title>无标题文档</title>
  12. </head>
  13. <body>
  14. <%
  15.        String oldpassword;  
  16.        String password1;
  17.        String password2;
  18.        String name;
  19.   
  20.         name=request.getParameter("name");
  21.         oldpassword=request.getParameter("oldpassword");
  22.         password1=request.getParameter("password1");
  23.         password2=request.getParameter("password2");
  24. customerBean.setName(name);
  25. customerBean.setPassword(password1);//新密码
  26. customerBean.setPassword1(oldpassword);//老密码
  27.          //System.out.println(password);
  28.   if(customerBean.update3() == 1)
  29.    {    
  30.    
  31.   out.println("<Script language=JavaScript>alert('密码修改成功');javascript:history.back();</Script>");
  32.    }
  33.    else
  34.    {
  35.        out.println("<Script language=JavaScript>alert('密码修改失败,可能旧密码不正确');javascript:history.back();</Script>");
  36.    }
  37. %>
  38. </body>
  39. </html>