⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 do_0005fupdatepwdjsp_0002ejsp_jsp.java

📁 一个聊天系统
💻 JAVA
字号:
import java.sql.*;
import chatroomweb.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class do_0005fUpdatePwdJsp_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/do_UpdatePwdJsp.jsp";from=(4,0);to=(4,68)]
    // end

    static {
    }
    public do_0005fUpdatePwdJsp_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="/do_UpdatePwdJsp.jsp";from=(0,48);to=(1,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(1,31);to=(2,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(2,33);to=(4,0)]
                out.write("\r\n\r\n");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(4,0);to=(4,68)]
                chatroomweb.DbJspBean dbBean = null;
                boolean _jspx_specialdbBean  = false;
                 synchronized (pageContext) {
                    dbBean= (chatroomweb.DbJspBean)
                    pageContext.getAttribute("dbBean",PageContext.PAGE_SCOPE);
                    if ( dbBean == null ) {
                        _jspx_specialdbBean = true;
                        try {
                            dbBean = (chatroomweb.DbJspBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "chatroomweb.DbJspBean");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"chatroomweb.DbJspBean", exc);
                        }
                        pageContext.setAttribute("dbBean", dbBean, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialdbBean == true) {
            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(4,0);to=(4,68)]
                }
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(4,82);to=(15,0)]
                out.write("\r\n\r\n<html>\r\n<head>\r\n<title>\r\ndo_UpdatePwdJsp\r\n</title>\r\n</head>\r\n<body bgcolor=\"#008080\">\r\n<h1>\r\n</h1>\r\n");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(15,2);to=(30,0)]
                
                String getname;
                String getoldpwd;
                String getnewpwd;
                String getconfirmpwd;
                
                getname=request.getParameter("name");
                getoldpwd=request.getParameter("oldpwd");
                getnewpwd=request.getParameter("newpwd");
                getconfirmpwd=request.getParameter("confirmpwd");
                
                int n=getname.length()*getoldpwd.length()*getnewpwd.length()*getconfirmpwd.length();
                
                if(n==0)
                {
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(30,2);to=(36,0)]
                out.write("\r\n<p align=\"center\">\r\n  <b>修改失败,请填写信息不能为空!</b>;\r\n  <br>\r\n  <p><a href=\"ChangePwdJsp.jsp\">返回</a></p>\r\n</p>\r\n");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(36,2);to=(40,0)]
                
                }
                else if(getconfirmpwd.compareTo(getnewpwd)!=0)
                {
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(40,2);to=(43,12)]
                out.write("\r\n<p align=\"center\">\r\n\r\n  <b>状态:修改失败");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(43,15);to=(43,28)]
                out.print(getconfirmpwd);
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(43,30);to=(43,33)]
                out.write("   ");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(43,36);to=(43,45)]
                out.print(getnewpwd);
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(43,47);to=(49,0)]
                out.write("\r\n     报告原因:新口令与确认口令不一致</b>\r\n  <br>\r\n  <p><a href=\"ChangePwdJsp.jsp\">返回</a></p>\r\n</p>\r\n\r\n");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(49,2);to=(58,0)]
                
                }
                else
                {
                     dbBean.connect();
                     String sql="update admin_info set admin_pwd ="+getnewpwd
                                  +" where admin_name='"+getname+"'and admin_pwd='"+getnewpwd+"'";
                     if(dbBean.executeSql(sql))
                     {
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(58,2);to=(66,0)]
                out.write("\r\n<p align=\"center\">\r\n\r\n        <b>修改正确!</b>;\r\n        <br>\r\n        <p><a href=\"ChangePwdJsp.jsp\">返回</a></p>\r\n</p>\r\n\r\n");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(66,2);to=(70,0)]
                
                    }
                     else
                     {
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(70,2);to=(78,0)]
                out.write("\r\n<p align=\"center\">\r\n\r\n   <b>请确认密码正确!</b>;\r\n  <br>\r\n  <p><a href=\"ChangePwdJsp.jsp\">返回</a></p>\r\n</p>\r\n\r\n");

            // end
            // begin [file="/do_UpdatePwdJsp.jsp";from=(78,2);to=(82,0)]
                
                   }
                }
                
            // end
            // HTML // begin [file="/do_UpdatePwdJsp.jsp";from=(82,2);to=(86,0)]
                out.write("\r\n\r\n</body>\r\n</html>\r\n");

            // 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);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -