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

📄 login_jsp.java

📁 一个简单的java web项目 基于servlet构建
💻 JAVA
字号:
package org.apache.jsp.pages;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

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

  private static java.util.List _jspx_dependants;

  public Object 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=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, 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\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
      out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");

	String cpath = request.getContextPath();
 
      out.write("\r\n");
      out.write("\t<head>\r\n");
      out.write("\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n");
      out.write("\t\t<title>用户登录</title>\r\n");
      out.write("\t\t<style type=\"text/css\">*{ margin:0px; padding:0px; font-size:12px; color: #002B55; font-family:\"宋体\"}body{ background:url(images/newLogin/bg.jpg) repeat-x;}.dd_login{ width:483px; height:369px; background:url(images/newLogin/login_bg.jpg) no-repeat; margin:187px auto 0px auto;}.login_win{  padding:39px 0px 40px 241px;}.dispace{ margin-top:15px;}.dd_input{ width:130px; height:15px;}.dd_img{ padding:25px 0px 18px 75px}</style>\r\n");
      out.write("\t</head>\r\n");
      out.write("\t<body> \r\n");
      out.write("\t\t<form name=\"form\" method=\"post\" action=\"");
      out.print(cpath );
      out.write("/login\">\r\n");
      out.write("\t\t<input type=\"hidden\" id=\"flag\" name=\"flag\" value=\"<s:property value=\"flag\"/>\" />\r\n");
      out.write("\t\t\t<div class=\"dd_login\">\r\n");
      out.write("\t\t\t\t<div class=\"dd_img\">\r\n");
      out.write("\t\t\t\t\t<img src=\"");
      out.print(cpath );
      out.write("/images/newLogin/img_5.jpg\" width=\"167\" height=\"28\" />\r\n");
      out.write("\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t<div class=\"login_win\">\r\n");
      out.write("\t\t\t\t\t用户:\r\n");
      out.write("\r\n");
      out.write("\t\t\t\t\t<input type=\"text\" name=\"loginName\" id=\"username\" class=\"dd_input\" />\r\n");
      out.write("\t\t\t\t\t<br />\r\n");
      out.write("\t\t\t\t\t密码:\r\n");
      out.write("\r\n");
      out.write("\t\t\t\t\t<input type=\"password\" name=\"password\" id=\"userpassword\"\r\n");
      out.write("\t\t\t\t\t\tclass=\"dispace dd_input\"/>\r\n");
      out.write("\t\t\t\t\t<br />\r\n");
      out.write("\t\t\t\t\t<div class=\"dispace\">\r\n");
      out.write("\t\t\t\t\t\t&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t\t<input type=\"image\" name=\"submit\" id=\"submit\"\r\n");
      out.write("\t\t\t\t\t\t\tsrc=\"");
      out.print(cpath );
      out.write("/images/newLogin/dl_btn.gif\"/>\r\n");
      out.write("\t\t\t\t\t\t&nbsp;\r\n");
      out.write("\t\t\t\t\t\t<input type=\"image\" name=\"reset\" id=\"reset\"\r\n");
      out.write("\t\t\t\t\t\t\tsrc=\"");
      out.print(cpath );
      out.write("/images/newLogin/gb_btn.gif\" onclick=\"window.close()\"/>\r\n");
      out.write("\t\t\t\t\t</div>\r\n");
      out.write("\r\n");
      out.write("\t\t\t\t</div>\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("\t\t</form>\r\n");
      out.write("\t</body>\r\n");
      out.write("</html>\r\n");
      out.write("\t\r\n");
      out.write("\t<script type=\"text/javascript\">\r\n");
      out.write("\t\tvar para=document.getElementById('flag').value;\r\n");
      out.write("\t\tif(para==3){\r\n");
      out.write("\t\t\talert(\"连续三次登陆不成功将关闭窗口!\");\r\n");
      out.write("\t\t\twindow.close();\r\n");
      out.write("\t\t}\r\n");
      out.write("\t</script>\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 + -