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

📄 addnewuser_jsp.java

📁 一个基于JAVA的BS结构的宠物诊所管理系统.是当年在学校时写的,大家指点一下.
💻 JAVA
字号:
package org.apache.jsp;

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

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

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(5);
    _jspx_dependants.add("/WEB-INF/struts-bean.tld");
    _jspx_dependants.add("/WEB-INF/struts-html.tld");
    _jspx_dependants.add("/WEB-INF/struts-logic.tld");
    _jspx_dependants.add("/WEB-INF/tags/head.tag");
    _jspx_dependants.add("/WEB-INF/tags/cauda.tag");
  }

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_if_test;

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

  public void _jspInit() {
    _jspx_tagPool_c_if_test = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _jspx_tagPool_c_if_test.release();
  }

  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=GBK");
      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("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      if (_jspx_meth_c_if_0(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("<HTML>\r\n");
      out.write("<HEAD>\r\n");
      out.write("<TITLE>管理系统之添加新用户</TITLE>\r\n");
      out.write("<META http-equiv=Content-Type content=\"text/html; charset=gbk\">\r\n");
      out.write("<script language=\"javascript\" type=\"\" src=\"datasrc/javascript/util.js\"></script>\r\n");
      out.write("<script type=\"\" language=\"JavaScript\">\r\n");
      out.write("\t\r\n");
      out.write("      function addNewUserAction(){\r\n");
      out.write("      \t//form1 userName userPassword userPassword2\r\n");
      out.write("      \tif(!isUserName(document.form1.userName)){\r\n");
      out.write("      \t\t\treturn false;\r\n");
      out.write("      \t\t}\r\n");
      out.write("      \t\r\n");
      out.write("      \tif(!isPassword(document.form1.userPassword)){\r\n");
      out.write("      \t\t\treturn false;\r\n");
      out.write("      \t\t}\r\n");
      out.write("      \tif(!validatePassword(document.form1.userPassword,document.form1.userPassword2)){\r\n");
      out.write("      \t\t\treturn false;\r\n");
      out.write("      \t\t}\r\n");
      out.write("\t      \t//return false;\r\n");
      out.write("\t      \treturn true;\r\n");
      out.write("      }\r\n");
      out.write("</script>\r\n");
      out.write("\r\n");
      out.write("</HEAD>\r\n");
      out.write("<LINK href=\"datasrc/style.css\" type=text/css rel=stylesheet>\r\n");
      out.write("  <body>\r\n");
      out.write("    ");
      if (_jspx_meth_mytag_head_0(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("    <TABLE cellSpacing=0 cellPadding=0 width=776 align=center background=datasrc/centerbg.gif border=0>\r\n");
      out.write("\t<tr>\r\n");
      out.write("\t<td height=\"30\" >&nbsp;</td><td>&nbsp;</td>\r\n");
      out.write("\t</tr>\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td width=\"258\" valign=\"top\">\r\n");
      out.write("          <table width=\"100%\" height=\"118\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td>&nbsp;</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr align=\"center\">\r\n");
      out.write("            <td ><a href=\"admin.jsp\"><font class=\"STYLE8\"> &lt;&lt;&lt;返回管理员页面</font></a></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td>&nbsp;</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table>\r\n");
      out.write("      </td>\r\n");
      out.write("        <td>\r\n");
      out.write("          <form name=\"form1\" method=\"post\" action=\"addNewUser.do\" onsubmit=\"return addNewUserAction()\">\r\n");
      out.write("\t\t<table width=\"80%\" bordercolor=\"#FF9900\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td>&nbsp;</td>\r\n");
      out.write("            <td><h3>添加新用户</h3></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td align=\"right\">&nbsp;<strong>用户名</strong>:</td>\r\n");
      out.write("            <td><label>\r\n");
      out.write("              <input name=\"userName\" type=\"text\" id=\"userName\" size=\"30\">\r\n");
      out.write("            </label></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td align=\"right\"><strong>密&nbsp;&nbsp;码:</strong></td>\r\n");
      out.write("            <td><label>\r\n");
      out.write("              <input name=\"userPassword\" type=\"password\" id=\"userPassword\" size=\"16\">\r\n");
      out.write("            </label></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("\t\t  <tr>\r\n");
      out.write("\t\t    <td align=\"right\"><strong>再确认密码:</strong></td>\r\n");
      out.write("\t\t    <td><input name=\"userPassword2\" type=\"password\" id=\"userPassword2\" size=\"16\"></td>\r\n");
      out.write("\t      </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td align=\"right\"><strong>是否管理员:</strong></td>\r\n");
      out.write("            <td><label>\r\n");
      out.write("              <input type=\"radio\" name=\"isAdmin\" value=\"1\">\r\n");
      out.write("              <strong>是</strong> </label>\r\n");
      out.write("              <label>\r\n");
      out.write("              <input name=\"isAdmin\" type=\"radio\" value=\"0\" checked>\r\n");
      out.write("              <strong>否</strong></label></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("\t\t  <tr>\r\n");
      out.write("            <td>&nbsp;</td>\r\n");
      out.write("            <td><label>\r\n");
      out.write("              <input type=\"submit\" value=\"确定\">\r\n");
      out.write("            </label>\r\n");
      out.write("              <label>\r\n");
      out.write("              <input type=\"reset\" value=\"取消\">\r\n");
      out.write("            </label>          </td>\r\n");
      out.write("          </tr>\r\n");
      out.write("\t\t  \r\n");
      out.write("        </table>\r\n");
      out.write("        </form>\r\n");
      out.write("        ");
      if (_jspx_meth_c_if_1(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("      </td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table>\r\n");
      out.write("    ");
      if (_jspx_meth_mytag_cauda_0(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("  </body>\r\n");
      out.write("</html>\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);
    }
  }

  private boolean _jspx_meth_c_if_0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_if_0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
    _jspx_th_c_if_0.setPageContext(_jspx_page_context);
    _jspx_th_c_if_0.setParent(null);
    _jspx_th_c_if_0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${not sessionScope.UserInfo.admin}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue());
    int _jspx_eval_c_if_0 = _jspx_th_c_if_0.doStartTag();
    if (_jspx_eval_c_if_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      do {
        out.write("\r\n");
        out.write("  ");
        if (true) {
          _jspx_page_context.forward("welcome.jsp");
          return true;
        }
        out.write('\r');
        out.write('\n');
        int evalDoAfterBody = _jspx_th_c_if_0.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
    }
    if (_jspx_th_c_if_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
      return true;
    _jspx_tagPool_c_if_test.reuse(_jspx_th_c_if_0);
    return false;
  }

  private boolean _jspx_meth_mytag_head_0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  mytag:head
    org.apache.jsp.tag.web.head_tag _jspx_th_mytag_head_0 = new org.apache.jsp.tag.web.head_tag();
    _jspx_th_mytag_head_0.setJspContext(_jspx_page_context);
    _jspx_th_mytag_head_0.doTag();
    return false;
  }

  private boolean _jspx_meth_c_if_1(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_if_1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
    _jspx_th_c_if_1.setPageContext(_jspx_page_context);
    _jspx_th_c_if_1.setParent(null);
    _jspx_th_c_if_1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${not empty requestScope.AddNewUserMessage}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue());
    int _jspx_eval_c_if_1 = _jspx_th_c_if_1.doStartTag();
    if (_jspx_eval_c_if_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      do {
        out.write("\r\n");
        out.write("          <p>\r\n");
        out.write("          <font color=\"#ff0000\" size=\"3\"><b>\r\n");
        out.write("          ");
        out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${requestScope.AddNewUserMessage}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
        out.write("</b>\r\n");
        out.write("          </font>\r\n");
        out.write("          </p>\r\n");
        out.write("          <p />\r\n");
        out.write("        ");
        int evalDoAfterBody = _jspx_th_c_if_1.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
    }
    if (_jspx_th_c_if_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
      return true;
    _jspx_tagPool_c_if_test.reuse(_jspx_th_c_if_1);
    return false;
  }

  private boolean _jspx_meth_mytag_cauda_0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  mytag:cauda
    org.apache.jsp.tag.web.cauda_tag _jspx_th_mytag_cauda_0 = new org.apache.jsp.tag.web.cauda_tag();
    _jspx_th_mytag_cauda_0.setJspContext(_jspx_page_context);
    _jspx_th_mytag_cauda_0.doTag();
    return false;
  }
}

⌨️ 快捷键说明

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