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

📄 login_0005fconfirm_0002ejsp_jsp.java

📁 jsp的图书购物系统
💻 JAVA
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class login_0005fconfirm_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/login_confirm.jsp";from=(7,0);to=(7,55)]
    // end

    static {
    }
    public login_0005fconfirm_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=GB2312");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // HTML // begin [file="/login_confirm.jsp";from=(0,51);to=(6,0)]
                out.write("\r\n<html>\r\n<head>\r\n<title>登录检查</title>\r\n</head>\r\n<body>\r\n");

            // end
            // HTML // begin [file="/login_confirm.jsp";from=(6,47);to=(7,0)]
                out.write("\r\n");

            // end
            // begin [file="/login_confirm.jsp";from=(7,0);to=(7,55)]
                book.bk users = null;
                boolean _jspx_specialusers  = false;
                 synchronized (pageContext) {
                    users= (book.bk)
                    pageContext.getAttribute("users",PageContext.PAGE_SCOPE);
                    if ( users == null ) {
                        _jspx_specialusers = true;
                        try {
                            users = (book.bk) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "book.bk");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"book.bk", exc);
                        }
                        pageContext.setAttribute("users", users, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialusers == true) {
            // end
            // begin [file="/login_confirm.jsp";from=(7,0);to=(7,55)]
                }
            // end
            // HTML // begin [file="/login_confirm.jsp";from=(7,55);to=(8,0)]
                out.write("\r\n");

            // end
            // begin [file="/login_confirm.jsp";from=(8,2);to=(18,0)]
                
                String name = request.getParameter("login");
                name = new String(name.getBytes("ISO8859-1"));
                String pwd = request.getParameter("password");
                pwd = new String(pwd.getBytes("ISO8859-1"));
                String sql="select * from 客户信息 where logname='" + name + "' and password='" + pwd + "'";
                ResultSet rs = users.executeQuery(sql);
                if (rs.next()){
                	rs.close();
                	session.putValue("username",name);
            // end
            // HTML // begin [file="/login_confirm.jsp";from=(18,2);to=(19,0)]
                out.write("\r\n");

            // end
            // begin [file="/login_confirm.jsp";from=(19,0);to=(19,31)]
                if (true) {
                    out.clear();
                    String _jspx_qfStr = "";
                    pageContext.forward("index.jsp" +  _jspx_qfStr);
                    return;
                }
            // end
            // HTML // begin [file="/login_confirm.jsp";from=(19,31);to=(20,0)]
                out.write("\r\n");

            // end
            // begin [file="/login_confirm.jsp";from=(20,2);to=(23,0)]
                 }
                else{
                 rs.close();
            // end
            // HTML // begin [file="/login_confirm.jsp";from=(23,2);to=(24,0)]
                out.write("\r\n");

            // end
            // begin [file="/login_confirm.jsp";from=(24,0);to=(24,32)]
                if (true) {
                    out.clear();
                    String _jspx_qfStr = "";
                    pageContext.forward("login.html" +  _jspx_qfStr);
                    return;
                }
            // end
            // HTML // begin [file="/login_confirm.jsp";from=(24,32);to=(25,0)]
                out.write("\r\n");

            // end
            // begin [file="/login_confirm.jsp";from=(25,2);to=(25,5)]
                 } 
            // end
            // HTML // begin [file="/login_confirm.jsp";from=(25,7);to=(27,7)]
                out.write("\r\n</body>\r\n</html>");

            // 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 + -