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

📄 logon_0002ejsp_jsp.java

📁 点歌系统
💻 JAVA
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class logon_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/logon.jsp";from=(8,3);to=(8,39)]
         String user_name,user_password,sql;
    // end
    // begin [file="/logon.jsp";from=(9,3);to=(9,21)]
         Connection conn; 
    // end
    // begin [file="/logon.jsp";from=(10,3);to=(10,18)]
         ResultSet rs; 
    // end
    // begin [file="/logon.jsp";from=(11,3);to=(11,20)]
         Statement stmt; 
    // end

    static {
    }
    public logon_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="/logon.jsp";from=(0,97);to=(8,0)]
                out.write("\r\n<html>\r\n<head>\r\n<title>\r\n正在查询。。。\r\n</title>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n");

            // end
            // HTML // begin [file="/logon.jsp";from=(8,41);to=(9,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/logon.jsp";from=(9,23);to=(10,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/logon.jsp";from=(10,20);to=(11,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/logon.jsp";from=(11,22);to=(12,0)]
                out.write("\r\n");

            // end
            // begin [file="/logon.jsp";from=(12,2);to=(26,0)]
                
                user_name=request.getParameter("name");
                user_name=new String(user_name.getBytes("ISO-8859-1"));
                user_password=request.getParameter("password");
                user_password=new String(user_password.getBytes("ISO-8859-1"));
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
                conn=DriverManager.getConnection("jdbc:odbc:song"," "," ") ;
                stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY ) ;
                rs=stmt.executeQuery("select * from mycfg where name='"+user_name+"' and password='"+user_password+"'") ;
                if (rs.next()) {
                session.putValue("username",user_name);
                response.sendRedirect("index.jsp");
                }
                else {
            // end
            // HTML // begin [file="/logon.jsp";from=(26,2);to=(35,0)]
                out.write("\r\n<table align=\"center\" width=\"100%\">\r\n<tr>\r\n<td align=\"center\">登录失败!</td>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" ><a href=\"index.jsp\">返回</a></td>\r\n</tr>\r\n</table>\r\n");

            // end
            // begin [file="/logon.jsp";from=(35,2);to=(40,0)]
                
                }
                rs.close() ;
                stmt.close() ;
                conn.close() ;
            // end
            // HTML // begin [file="/logon.jsp";from=(40,2);to=(44,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 + -