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

📄 checkuser_0002ejsp_jsp.java

📁 一个做得非常好的电子政务系统
💻 JAVA
字号:
import java.sql.*;
import java.util.*;
import com.masterwork.database.*;
import com.masterwork.tool.*;
import com.masterwork.system.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class checkuser_0002ejsp_jsp extends HttpJspBase
     implements 
 SingleThreadModel
 {


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

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

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

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

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

            // end
            // HTML // begin [file="/checkuser.jsp";from=(5,42);to=(15,0)]
                out.write("\r\n\r\n<html>\r\n<head>\r\n<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\r\n<META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">\r\n<META HTTP-EQUIV=\"Expires\" CONTENT=\"0\">\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title></title>\r\n<link href=\"skin/css/2003.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");

            // end
            // begin [file="/checkuser.jsp";from=(15,2);to=(23,7)]
                
                    String sYGZH = Convert.toGBK(request.getParameter("username"));
                    String sYGMM = Convert.toGBK(request.getParameter("password"));
                
                    //新建一个连接
                    DataConn dataConn = new DataConn();
                
                    if(dataConn.getConnection()==null) {
                       
            // end
            // HTML // begin [file="/checkuser.jsp";from=(23,9);to=(24,54)]
                out.write("\r\n       <div align=\"center\"><font size=\"3\" color=\"red\">");

            // end
            // begin [file="/checkuser.jsp";from=(24,56);to=(24,89)]
                out.println("数据库连接失败,请与系统管理员联系");
            // end
            // HTML // begin [file="/checkuser.jsp";from=(24,91);to=(25,7)]
                out.write("</font></font></div>\r\n       ");

            // end
            // begin [file="/checkuser.jsp";from=(25,9);to=(37,4)]
                
                       return;
                    }
                
                    UserInfor userInfor = null;
                    User userClass = new User(dataConn);
                    //检查登陆信息是否正确
                    boolean flag = userClass.isSystemUser(sYGZH, sYGMM);
                
                    if (flag) {
                        userInfor = userClass.getUserInfor();
                        session.setAttribute("UserInfor", userInfor);
                    
            // end
            // HTML // begin [file="/checkuser.jsp";from=(37,6);to=(48,4)]
                out.write("\r\n    <SCRIPT language=\"javascript\">\r\n        function this_win(w,h) {\r\n            var ww=window.screen.availwidth*w/100;\r\n            var hh=window.screen.availheight*h/100;\r\n            window.resizeTo(ww,hh);\r\n            window.moveTo(0,0);\r\n            window.document.location.href=\"main/index.html\";\r\n        }\r\n        this_win(100,100);\r\n    </SCRIPT>\r\n    ");

            // end
            // begin [file="/checkuser.jsp";from=(48,6);to=(65,0)]
                
                    }
                    else {
                        System.out.println(userClass.getMessage());
                        String sHref = "login.jsp";
                        out.println("<Script Language='javaScript'>");
                        out.println("alert('"+ userClass.getMessage() +"!');");
                        out.println("document.location.href=\""+sHref+"\"");
                        out.println("</Script>");
                    }
                
                    try {
                        if (dataConn != null) {
                            dataConn.close();
                        }
                    }
                    catch(Exception e) {}
            // end
            // HTML // begin [file="/checkuser.jsp";from=(65,2);to=(67,0)]
                out.write("\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 + -