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

📄 test_jsp.java

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

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import cn.aresoft.util.SystemDictUtil;
import cn.aresoft.po.SystemDict;
import cn.aresoft.po.SystemDictId;
import java.util.*;
import cn.aresoft.po.SysUserInfo;
import cn.aresoft.fw.ServiceLocator;
import cn.aresoft.modules.systemmanage.function.FunctionService;

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

  private static java.util.List _jspx_dependants;

  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fiterator_005fvalue_005fid;
  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody;

  public Object getDependants() {
    return _jspx_dependants;
  }

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

  public void _jspDestroy() {
    _005fjspx_005ftagPool_005fs_005fiterator_005fvalue_005fid.release();
    _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.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=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("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \r\n");
      out.write("\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");

	String cpath=request.getContextPath();
	SystemDictUtil sysutil = null;
	List list = null;
	Iterator it = null;

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("\t<head>\r\n");
      out.write("\t    <title>客户分组创建</title>\r\n");
      out.write("\t\t<link href=\"");
      out.print(cpath);
      out.write("/style/css_common1.css\" rel=\"stylesheet\"\r\n");
      out.write("\t\t\ttype=\"text/css\" />\r\n");
      out.write("\t\t<link href=\"");
      out.print(cpath);
      out.write("/style/mian.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
      out.write("\t\t<script src=\"");
      out.print(cpath);
      out.write("/js/page.js\"></script>\r\n");
      out.write("\t\t<script src=\"");
      out.print(cpath);
      out.write("/js/jquery126.js\"></script>\r\n");
      out.write("\t\t<script src=\"");
      out.print(cpath);
      out.write("/js/effect.js\"></script>\t\t\r\n");
      out.write("\t\t<script src=\"");
      out.print(cpath);
      out.write("/js/ajax.js\"></script>\t\t\r\n");
      out.write("\t\t<script language=\"JavaScript\">\t\r\n");
      out.write("\t\tfunction addloading(){\r\n");
      out.write("\t\t\tif($('#loading')!=null&&$('#loading').html()!=null){\r\n");
      out.write("\t\t\t\t//alert(\"cunzai\");\r\n");
      out.write("\t\t\t\t$('#loading').show();\r\n");
      out.write("\t\t\t}else{\r\n");
      out.write("\t\t\t\t//alert(\"bucunzai\");\r\n");
      out.write("\t\t\t\tvar ld=$(\"<div id=loading style='position: absolute;z-index:2000;left: expression((document.body.offsetWidth-100)/2);top:expression((document.body.offsetHeight-100)/2);width:160px;height:50px;border:solid 3px gray;filter:Alpha(Opacity=60);background-color:#fffffe'><table style='width:100px;height:25px'></tr><tr><td align='center' style='height:10px'><strong><font color='blue' size='2'>loading...</font></strong></td></tr><tr><td align='right' valign='middle' style='padding-left:8px;padding-bottom:5px'><div class='loadingIcon'>&nbsp;</div></td></table></div>\")\r\n");
      out.write("\t\t\t\t$(\"body\").prepend(ld);\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\r\n");
      out.write("\t\tfunction removeloading(){\r\n");
      out.write("\t\t\t$('#loading').hide();\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tfunction changetest(obj){\r\n");
      out.write("\t\t\tvar val = $(obj).val();//val应该都是 aresoft_dc_XXXX的格式\r\n");
      out.write("\t\t\t//alert(val);\r\n");
      out.write("\t\t\tvar level = parseInt($(obj).attr('id').substring(5));//\r\n");
      out.write("\t\t\tcurrent = obj;\r\n");
      out.write("\t\t\tfor(var i = 1;i<=4;i++){\r\n");
      out.write("\t\t\t\tif(i>level){\r\n");
      out.write("\t\t\t\t\t$('#level'+i).html('<option>请先选择上一级</option>');\r\n");
      out.write("\t\t\t\t}\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t\t//alert(\"");
      out.print(cpath);
      out.write("/custgrpmanage/changetable.action?tablename=\"+val);\r\n");
      out.write("\t\t\tif(val!=-1){\r\n");
      out.write("\t\t\t\tsendRequest(\"");
      out.print(cpath);
      out.write("/customermanage/selecttest.action?parentId=\"+val+\"&level=\"+level);\r\n");
      out.write("\t\t\t\taddloading();\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\t\r\n");
      out.write("\t\tfunction processresult(xmlValue){\r\n");
      out.write("\t\t\t//alert(xmlValue);\r\n");
      out.write("\t\t\tvar str = xmlValue.split('&');\r\n");
      out.write("\t\t\tvar level = str[0];\r\n");
      out.write("\t\t\tvar val = str[1];\r\n");
      out.write("\t\t\t$('#level'+level).html(val);\r\n");
      out.write("\t\t\tremoveloading();\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\t</script>\r\n");
      out.write("\t</head>\r\n");
      out.write("<body leftmargin=\"0\" topmargin=\"0\" class=\"bgOffice\" style=\"width:100%;height:100%\">\r\n");
      out.write("<form id=\"kform\" name=\"kform\">\r\n");
      out.write("\r\n");
      out.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;position: relative;\">\r\n");
      out.write("\t  <tr>\r\n");
      out.write("     \t<td class=\"bgOffice\" valign=\"top\" style=\"height:auto;\">\r\n");
      out.write("\t\t\t<table id=\"ctable\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"\" class=\"table02\">\r\n");
      out.write("\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t<td>一级渠道:</td>\r\n");
      out.write("\t\t\t\t\t<td>二级渠道:</td>\r\n");
      out.write("\t\t\t\t\t<td>三级渠道:</td>\r\n");
      out.write("\t\t\t\t\t<td>四级渠道:</td>\r\n");
      out.write("\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\r\n");
      out.write("\t\r\n");
      out.write("\t\t\t\t\r\n");
      out.write("\r\n");
      out.write("\t\t\t\t<tr id=\"end\">\r\n");
      out.write("\t\t\t\t\t<td class=\"bgInput\">\r\n");
      out.write("\t\t\t\t\t<select id=\"level1\" class=\"inpupt02\" onchange=\"changetest(this)\">\r\n");
      out.write("\t\t\t\t\t\t<option value=\"-1\" selected=\"selected\">请选择--</option>\r\n");
      out.write("\t\t\t\t\t\t\t");
      if (_jspx_meth_s_005fiterator_005f0(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("\t\t\t\t\t</select></td>\r\n");
      out.write("\t\t\t\t\t<td class=\"bgInput\" >\r\n");
      out.write("\t\t\t\t\t<select id=\"level2\" class=\"inpupt02\" onchange=\"changetest(this)\">\r\n");
      out.write("\t\t\t\t\t\t<option>请先选择上一级</option>\r\n");
      out.write("\t\t\t\t\t</select></td>\r\n");
      out.write("\t\t\t\t\t<td class=\"bgInput\">\r\n");
      out.write("\t\t\t\t\t<select id=\"level3\" class=\"inpupt02\" onchange=\"changetest(this)\">\r\n");
      out.write("\t\t\t\t\t\t<option>请先选择上一级</option>\r\n");
      out.write("\t\t\t\t\t</select></td>\r\n");
      out.write("\t\t\t\t\t<td class=\"bgInput\">\r\n");
      out.write("\t\t\t\t\t<select id=\"level4\" class=\"inpupt02\">\r\n");
      out.write("\t\t\t\t\t\t<option>请先选择上一级</option>\r\n");
      out.write("\t\t\t\t\t</select></td>\r\n");
      out.write("\t\t\t\t</tr>\r\n");
      out.write("\t</table>\r\n");
      out.write("\t\t</td>\r\n");
      out.write("\t</tr>\t\r\n");
      out.write(" </table>\r\n");
      out.write("</form>\r\n");
      out.write("\t</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_s_005fiterator_005f0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  s:iterator
    org.apache.struts2.views.jsp.IteratorTag _jspx_th_s_005fiterator_005f0 = (org.apache.struts2.views.jsp.IteratorTag) _005fjspx_005ftagPool_005fs_005fiterator_005fvalue_005fid.get(org.apache.struts2.views.jsp.IteratorTag.class);
    _jspx_th_s_005fiterator_005f0.setPageContext(_jspx_page_context);
    _jspx_th_s_005fiterator_005f0.setParent(null);
    _jspx_th_s_005fiterator_005f0.setId("item");
    _jspx_th_s_005fiterator_005f0.setValue("firstLevel");
    int _jspx_eval_s_005fiterator_005f0 = _jspx_th_s_005fiterator_005f0.doStartTag();
    if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
        out = _jspx_page_context.pushBody();
        _jspx_th_s_005fiterator_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
        _jspx_th_s_005fiterator_005f0.doInitBody();
      }
      do {
        out.write("\r\n");
        out.write("\t\t\t\t\t\t\t<option value=\"");
        if (_jspx_meth_s_005fproperty_005f0(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
          return true;
        out.write('"');
        out.write('>');
        if (_jspx_meth_s_005fproperty_005f1(_jspx_th_s_005fiterator_005f0, _jspx_page_context))
          return true;
        out.write("</option>\r\n");
        out.write("\t\t\t\t\t\t\t");
        int evalDoAfterBody = _jspx_th_s_005fiterator_005f0.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
      if (_jspx_eval_s_005fiterator_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
        out = _jspx_page_context.popBody();
      }
    }
    if (_jspx_th_s_005fiterator_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fs_005fiterator_005fvalue_005fid.reuse(_jspx_th_s_005fiterator_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fs_005fiterator_005fvalue_005fid.reuse(_jspx_th_s_005fiterator_005f0);
    return false;
  }

  private boolean _jspx_meth_s_005fproperty_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  s:property
    org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
    _jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
    _jspx_th_s_005fproperty_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
    _jspx_th_s_005fproperty_005f0.setValue("#item[0]");
    int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
    if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
    return false;
  }

  private boolean _jspx_meth_s_005fproperty_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_s_005fiterator_005f0, PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  s:property
    org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f1 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
    _jspx_th_s_005fproperty_005f1.setPageContext(_jspx_page_context);
    _jspx_th_s_005fproperty_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_005fiterator_005f0);
    _jspx_th_s_005fproperty_005f1.setValue("#item[1]");
    int _jspx_eval_s_005fproperty_005f1 = _jspx_th_s_005fproperty_005f1.doStartTag();
    if (_jspx_th_s_005fproperty_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
      return true;
    }
    _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
    return false;
  }
}

⌨️ 快捷键说明

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