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

📄 adlogin_0002ejsp_jsp.java

📁 网上书店,JSP,MYSQL,struct,spring,hibernate
💻 JAVA
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class adlogin_0002ejsp_jsp extends HttpJspBase {


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

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

            // end
            // begin [file="/adlogin.jsp";from=(2,2);to=(2,38)]
                request.setCharacterEncoding("GBK");
            // end
            // HTML // begin [file="/adlogin.jsp";from=(2,40);to=(3,0)]
                out.write("\r\n");

            // end
            // begin [file="/adlogin.jsp";from=(3,2);to=(19,3)]
                
                 try{
                	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
                	Connection con=DriverManager.getConnection("jdbc:odbc:Shopping");
                	Statement stmt=con.createStatement();
                	ResultSet rs=stmt.executeQuery("select * from admin");
                  String id;String pass;
                 String adminid=request.getParameter("adminid");
                String  password=request.getParameter("password");
                 while (rs.next()) {
                     id =(String)rs.getString(1);
                      pass =(String)rs.getString(2);
                    if ((adminid.equals(id)) && (password.equals(pass)))
                
                      {session.setAttribute("adminId",adminid);
                
                   
            // end
            // HTML // begin [file="/adlogin.jsp";from=(19,5);to=(20,0)]
                out.write("\r\n");

            // end
            // begin [file="/adlogin.jsp";from=(20,0);to=(20,43)]
                if (true) {
                    out.clear();
                    String _jspx_qfStr = "";
                    pageContext.forward("adminLoginSuccess.jsp" +  _jspx_qfStr);
                    return;
                }
            // end
            // HTML // begin [file="/adlogin.jsp";from=(20,43);to=(21,5)]
                out.write("\r\n     ");

            // end
            // begin [file="/adlogin.jsp";from=(21,7);to=(26,0)]
                
                      }
                 }
                  }catch(Exception e)
                { out.println(e);}
            // end
            // HTML // begin [file="/adlogin.jsp";from=(26,2);to=(29,0)]
                out.write("\r\n\r\n\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 + -