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

📄 __mentlogin.java

📁 全面的JSP+JAVABEAN+SQL的电子商城实例
💻 JAVA
字号:
/* compiled from JSP: /mentlogin.jsp
*
* This code was automatically generated at 22:19:37 on 2004-5-7
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*/

package jsp_servlet;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

// User imports
import java.sql.*; //[ /mentlogin.jsp; Line: 2]

// built-in init parameters:
// boolean             _verbose -- wants debugging

// Well-known variables:
// JspWriter out                  -- to write to the browser
// HttpServletRequest  request    -- the request object.
// HttpServletResponse response   -- the response object.
// PageContext pageContext        -- the page context for this JSP
// HttpSession session            -- the session object for the client (if any)
// ServletContext application     -- The servlet (application) context
// ServletConfig config           -- The ServletConfig for this JSP
// Object page                    -- the instance of this page's implementation class (i.e., 'this')

/**
* This code was automatically generated at 22:19:37 on 2004-5-7
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*
* Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
*/
public final class __mentlogin
extends
weblogic.servlet.jsp.JspBase
implements weblogic.servlet.jsp.StaleIndicator
{
    
    // StaleIndicator interface    public boolean _isStale() {        weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext());        java.io.File f = null;        long lastModWhenBuilt = 0L;        if (sci.isResourceStale("/mentlogin.jsp", 1083939446000L, "WebLogic Server 7.0  Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;        return false;    }        public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {        java.io.File f = null;        long lastModWhenBuilt = 0L;        if (sci.isResourceStale("/mentlogin.jsp", 1083939446000L, "WebLogic Server 7.0  Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;        return false;    }            
    
    public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException 
    {  
        
        // declare and set well-known variables:
        javax.servlet.ServletConfig config = getServletConfig();
        javax.servlet.ServletContext application = config.getServletContext();
        javax.servlet.jsp.tagext.Tag _activeTag = null;
        // variables for Tag extension protocol        
        Object page = this;
        javax.servlet.jsp.JspWriter out;
        javax.servlet.jsp.PageContext pageContext =        javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);        
        response.setHeader("Content-Type", "text/html; charset=GBK");        out = pageContext.getOut();        JspWriter _originalOut = out;        
        javax.servlet.http.HttpSession session = request.getSession(true);        
        
        
        try { // error page try block                        response.setContentType("text/html; charset=GBK");                        out.print("\r\n");            out.print("\r\n");            //[ /mentlogin.jsp; Line: 3]            try{ //[ /mentlogin.jsp; Line: 4]                //数据库连接 //[ /mentlogin.jsp; Line: 5]                Class.forName("oracle.jdbc.driver.OracleDriver"); //[ /mentlogin.jsp; Line: 6]                String strUrl = "jdbc:oracle:thin:@slight:1521:LOCAL"; //[ /mentlogin.jsp; Line: 7]                String strUser = "eshop"; //[ /mentlogin.jsp; Line: 8]                String strPassword = "eshop"; //[ /mentlogin.jsp; Line: 9]                String strUid = request.getParameter("uid"); //[ /mentlogin.jsp; Line: 10]                String strPwd = request.getParameter("pwd"); //[ /mentlogin.jsp; Line: 11]                Connection con = DriverManager.getConnection(strUrl, strUser, strPassword); //[ /mentlogin.jsp; Line: 12]                Statement st = con.createStatement(); //[ /mentlogin.jsp; Line: 13]                String sql = "select * from reguser where userid ='" + strUid + "' and pwd = '" + strPwd + "'" ; //[ /mentlogin.jsp; Line: 14]                ResultSet rs = st.executeQuery(sql); //[ /mentlogin.jsp; Line: 15]                if (rs.next()){ //[ /mentlogin.jsp; Line: 16]                    request.getSession(true).setAttribute("LoginSuccess", rs.getString("userid")); //[ /mentlogin.jsp; Line: 17]                    out.print("\r\n  ");                    if (true) { //forwarding request //[ /mentlogin.jsp; Line: 19]                        out.clear(); // clear current output buffer //[ /mentlogin.jsp; Line: 19]                        String __thePage =  //[ /mentlogin.jsp; Line: 19]                        //[ /mentlogin.jsp; Line: 19]                        "ment1.jsp"; //[ /mentlogin.jsp; Line: 19]                        pageContext.forward(__thePage); //[ /mentlogin.jsp; Line: 19]                        return; //[ /mentlogin.jsp; Line: 19]                    } //[ /mentlogin.jsp; Line: 19]                    out.print("\r\n");                    //[ /mentlogin.jsp; Line: 20]                }else{ //[ /mentlogin.jsp; Line: 21]                    out.print("\r\n  ");                    if (true) { //forwarding request //[ /mentlogin.jsp; Line: 23]                        out.clear(); // clear current output buffer //[ /mentlogin.jsp; Line: 23]                        String __thePage =  //[ /mentlogin.jsp; Line: 23]                        //[ /mentlogin.jsp; Line: 23]                        "loginsb.jsp"; //[ /mentlogin.jsp; Line: 23]                        pageContext.forward(__thePage); //[ /mentlogin.jsp; Line: 23]                        return; //[ /mentlogin.jsp; Line: 23]                    } //[ /mentlogin.jsp; Line: 23]                    out.print("\r\n");                    //[ /mentlogin.jsp; Line: 24]                } //[ /mentlogin.jsp; Line: 25]                out.print("\r\n<html>\r\n<head>\r\n<title>\r\nmentlogin\r\n</title>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n<h1>\r\nJBuilder Generated JSP\r\n</h1>\r\n</body>\r\n</html>\r\n");                //[ /mentlogin.jsp; Line: 39]            }catch(Exception e){ //[ /mentlogin.jsp; Line: 40]                throw (e); //[ /mentlogin.jsp; Line: 41]            } //[ /mentlogin.jsp; Line: 42]        } catch (Throwable __ee) {            while (out != null && out != _originalOut) out = pageContext.popBody();            ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);        }                
        //before final close brace...
    }
    
    
}

⌨️ 快捷键说明

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