* the request send by the client to the server * @param response * the response send by the server to the client * @throws ServletException * if an error occurred * @throws IOException * if an error occurred */ publicvoiddoGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response); }
/** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to * post. * * @param request * the request send by the client to the server * @param response * the response send by the server to the client * @throws ServletException * if an error occurred * @throws IOException * if an error occurred */ publicvoiddoPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); request.setCharacterEncoding("utf-8"); PrintWriter out = response.getWriter(); String m_id = request.getParameter("id"); String old; String pw1 = null; String pw2 = null; old = request.getParameter("oldpassword"); pw1 = request.getParameter("password1"); pw2 = request.getParameter("password2"); //查询原密码 String sql="select password from manager where id = '"+m_id+"'"; sqlBean db=new sqlBean(); ResultSet rs = db.executeQuery(sql); String dbOldPwd = ""; try {
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }
} package servlet;
publicclassupdateMpasswordextendsHttpServlet{
/** * Constructor of the object. */ publicupdateMpassword(){ super(); }
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }
} package servlet;
publicclassupdateSpasswordextendsHttpServlet{
/** * Constructor of the object. */ publicupdateSpassword(){ super(); }
/** * Destruction of the servlet. <br> */ publicvoiddestroy(){ super.destroy(); // Just puts "destroy" string in log // Put your code here }
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }
} package servlet;
publicclassm_updatescoreextendsHttpServlet{
/** * Constructor of the object. */ publicm_updatescore(){ super(); }
/** * Destruction of the servlet. <br> */ publicvoiddestroy(){ super.destroy(); // Just puts "destroy" string in log // Put your code here }
/** * The doGet method of the servlet. <br> * * This method is called when a form has its tag value method equals to get. *
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }