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

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 name;  
  16.        String userName;
  17.        String sex;
  18.        String brief;
  19.        String address;
  20.        String mobile;
  21.        String telephone;
  22.        String email;
  23.   
  24.         name=request.getParameter("name");
  25.         userName=request.getParameter("userName");
  26.         sex=request.getParameter("sex");
  27.         brief=request.getParameter("brief");
  28.         address=request.getParameter("address");
  29.         mobile=request.getParameter("mobile");
  30.         telephone=request.getParameter("telephone");
  31.         email=request.getParameter("email");
  32. //loginBean.setName(name);
  33. customerBean.setName(name);
  34. customerBean.setUserName(userName);
  35. customerBean.setSex(sex);
  36. customerBean.setBrief(brief);
  37. customerBean.setAddress(address);
  38. customerBean.setMobile(mobile);
  39. customerBean.setTelephone(telephone);
  40. customerBean.setEmail(email);
  41.     
  42.   if(customerBean.update2() == 1)  
  43.   {
  44.   out.println("<Script language=JavaScript>alert('更新成功');javascript:history.back();</Script>");
  45.    }
  46.    else
  47.    {
  48.        out.println("<Script language=JavaScript>alert('更新失败');javascript:history.back();</Script>");
  49.    }
  50. %>
  51. </body>
  52. </html>