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

📄 landing_jsp.java

📁 这是我上次报java培训时
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import jinLing.manager.*;

public final class Landing_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  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;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=gb2312");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"web_page/pub_include/ErrPage.jsp", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\r');
      out.write('\n');
request.setCharacterEncoding("gb2312");
      out.write("\r\n");
      out.write("\r\n");

  ManagerInfo managerInfo=new ManagerInfo();
  Hashtable list = new Hashtable();

  String spath="";        // 文件路径
  String iRecSult="";

  list.put("MAN_NO",request.getParameter("MAN_NO").toString());
  list.put("MAN_PWD",request.getParameter("MAN_PWD").toString());
  Hashtable lists = managerInfo.manLand(list);

  session.setAttribute("sMAN_NO","");    //  登陆帐号
  session.setAttribute("ROLE_1","");    //  登陆帐号
  session.setAttribute("ROLE_2","");    //  登陆帐号
  session.setAttribute("ROLE_3","");    //  登陆帐号
  session.setAttribute("ROLE_4","");    //  登陆帐号
  session.setAttribute("ROLE_5","");    //  登陆帐号
  session.setAttribute("ROLE_6","");    //  登陆帐号
  session.setAttribute("ROLE_7","");    //  登陆帐号
  session.setAttribute("ROLE_8","");    //  登陆帐号
  session.setAttribute("ROLE_9","");    //  登陆帐号
  session.setAttribute("ROLE_10","");    //  登陆帐号
  session.setAttribute("ROLE_11","");    //  登陆帐号
  session.setAttribute("ROLE_12","");    //  登陆帐号
  session.setAttribute("ROLE_13","");    //  登陆帐号
  session.setAttribute("ROLE_14","");    //  登陆帐号
  session.setAttribute("ROLE_15","");    //  登陆帐号
  
  int iRes=Integer.parseInt(lists.get("ST").toString());

  switch(iRes)
  {
     case 1:
          session.setMaxInactiveInterval(70000);  //session定义时长一天
		  session.setAttribute("sMAN_NO",lists.get("MAN_NO"));
		  session.setAttribute("ROLE_1",lists.get("ROLE_1"));    //  登陆帐号
          session.setAttribute("ROLE_2",lists.get("ROLE_2"));    //  登陆帐号
          session.setAttribute("ROLE_3",lists.get("ROLE_3"));    //  登陆帐号
          session.setAttribute("ROLE_4",lists.get("ROLE_4"));    //  登陆帐号
          session.setAttribute("ROLE_5",lists.get("ROLE_5"));    //  登陆帐号
          session.setAttribute("ROLE_6",lists.get("ROLE_6"));    //  登陆帐号
          session.setAttribute("ROLE_7",lists.get("ROLE_7"));    //  登陆帐号
          session.setAttribute("ROLE_8",lists.get("ROLE_8"));    //  登陆帐号
          session.setAttribute("ROLE_9",lists.get("ROLE_9"));    //  登陆帐号
          session.setAttribute("ROLE_10",lists.get("ROLE_10"));    //  登陆帐号
          session.setAttribute("ROLE_11",lists.get("ROLE_11"));    //  登陆帐号
          session.setAttribute("ROLE_12",lists.get("ROLE_12"));    //  登陆帐号
          session.setAttribute("ROLE_13",lists.get("ROLE_13"));    //  登陆帐号
          session.setAttribute("ROLE_14",lists.get("ROLE_14"));    //  登陆帐号
          session.setAttribute("ROLE_15",lists.get("ROLE_15"));    //  登陆帐号
	      break;
     case 0:
          iRecSult="登录系统失败,请重新输入用户名和密码!";
          break;
     case 2:
          iRecSult="帐号或密码错误,请重新输入!";
          break;
  }

      out.write("\r\n");
      out.write("<script language=\"JavaScript\">\r\n");
      out.write("    if(");
      out.print(iRes);
      out.write("==1)\r\n");
      out.write("\t  {\r\n");
      out.write("\t  window.location.href='control.jsp';\r\n");
      out.write("\t   }\r\n");
      out.write("    else{\r\n");
      out.write("       alert(\"");
      out.print(iRecSult);
      out.write("\");\r\n");
      out.write("       history.back();\r\n");
      out.write("    }\r\n");
      out.write("</script>\r\n");
      out.write("\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

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