public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    /*
     * // Create path components to save the file final String path =
     * request.getParameter("destination"); final Part filePart =
     * request.getPart("file"); final String fileName =
     * getFileName(filePart);
     */

    String path = request.getContextPath();
    String csvFileToRead = request.getRealPath("/") + "mail.csv";
    BufferedReader br = null;
    String line = "";
    String splitBy = ",";

    JSONArray jArrayMails = new JSONArray();
    try {
      br = new BufferedReader(new FileReader(csvFileToRead));
      while ((line = br.readLine()) != null) {
        jArrayMails.add(line);
      }
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      if (br != null) {
        try {
          br.close();
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    }

    response.setContentType("application/json");
    PrintWriter out = response.getWriter();
    JSONObject jobj = new JSONObject();
    jobj.put("studentEmailsArray", jArrayMails);
    out.print(jobj);
  }
 /**
  * Show the pieces of the request, for debugging
  *
  * @param req the HttpServletRequest
  * @return parsed request
  */
 public static String getRequestParsed(HttpServletRequest req) {
   return req.getRequestURI()
       + " = "
       + req.getContextPath()
       + "(context), "
       + req.getServletPath()
       + "(servletPath), "
       + req.getPathInfo()
       + "(pathInfo), "
       + req.getQueryString()
       + "(query)";
 }
 @Override
 protected void service(HttpServletRequest req, HttpServletResponse resp)
     throws ServletException, IOException {
   traceRequest(req);
   String pathInfoString = req.getPathInfo();
   String queryString = getQueryString(req);
   IPath pathInfo =
       new Path(
           null /*don't parse host:port as device*/,
           pathInfoString == null ? "" : pathInfoString); // $NON-NLS-1$
   if (pathInfo.segmentCount() > 0) {
     String hostedHost = pathInfo.segment(0);
     IHostedSite site = HostingActivator.getDefault().getHostingService().get(hostedHost);
     if (site != null) {
       IPath path = pathInfo.removeFirstSegments(1);
       IPath contextPath = new Path(req.getContextPath());
       IPath contextlessPath = path.makeRelativeTo(contextPath).makeAbsolute();
       URI[] mappedPaths;
       try {
         mappedPaths = getMapped(site, contextlessPath, queryString);
       } catch (URISyntaxException e) {
         handleException(
             resp,
             new ServerStatus(
                 IStatus.ERROR,
                 HttpServletResponse.SC_BAD_REQUEST,
                 "Could not create target URI	",
                 e));
         return;
       }
       if (mappedPaths != null) {
         serve(req, resp, site, mappedPaths);
       } else {
         handleException(
             resp,
             new ServerStatus(
                 IStatus.ERROR,
                 HttpServletResponse.SC_NOT_FOUND,
                 NLS.bind("No mappings matched {0}", path),
                 null));
       }
     } else {
       String msg = NLS.bind("Hosted site {0} is stopped", hostedHost);
       handleException(
           resp, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, msg, null));
     }
   } else {
     super.doGet(req, resp);
   }
 }
Beispiel #4
0
  // ------------------------------------------
  public static String chooseServiceURI(String uri, HttpServletRequest httpRequest) {
    String serviceURI = uri;
    String contextPath = httpRequest.getContextPath();

    if (contextPath != null && contextPath.length() > 0)
      serviceURI = serviceURI.substring(contextPath.length());

    String servletPath = httpRequest.getServletPath();

    // Suggested by Frank Hartman: helps make conf files more portable
    // between /joseki/myModel and /myModel but if the servlet is
    // explicitly named in web.xml, it strips that off
    //        if ( servletPath != null && servletPath.length() > 0 )
    //            dispatchURI = dispatchURI.substring(servletPath.length()) ;

    // Suggested by damien_coraboeuf
    // TODO Test and verify
    //        if ( servletPath != null && servletPath.length() > 0 )
    //            serviceURI = serviceURI.substring(servletPath.length()) ;

    // Example:
    //    <servlet-mapping>
    //        <servlet-name>JosekiServlet</servlet-name>
    //        <url-pattern>/ws/joseki/*</url-pattern>
    //    </servlet-mapping>

    if (log.isDebugEnabled()) {
      if (servletPath == null) servletPath = "";
      if (contextPath == null) contextPath = "";
      log.debug(
          "DispatchURI: "
              + uri
              + " => "
              + serviceURI
              + " (ContextPath = "
              + contextPath
              + ", ServletPath = "
              + servletPath
              + ")");
    }
    return serviceURI;
  }
Beispiel #5
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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('\n');

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE html>\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<base href=\"");
      out.print(basePath);
      out.write("\">\n");
      out.write("\n");
      out.write("<title>工程师工作纪要 查看</title>\n");
      out.write("<meta http-equiv=\"pragma\" content=\"no-cache\">\n");
      out.write("<meta http-equiv=\"cache-control\" content=\"no-cache\">\n");
      out.write("<meta http-equiv=\"expires\" content=\"0\">\n");
      out.write("<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\n");
      out.write("<meta http-equiv=\"description\" content=\"This is my page\">\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\" />\n");
      out.write("<script type=\"text/javascript\" src=\"js/jquery.min.js\"></script>\n");
      out.write("<script type=\"text/javascript\" src=\"js/common.js\"></script>\n");
      out.write("</head>\n");

      WorksBean worksBean = (WorksBean) request.getAttribute("worksBean");

      if (worksBean == null) {
        return;
      }

      out.write("\n");
      out.write("<body>\n");
      out.write("\t<div class=\"container\">\n");
      out.write("\t\t<div class=\"header headermiddle\">\n");
      out.write("\t\t\t<div class=\"headermleft\"></div>\n");
      out.write("\n");
      out.write("\t\t\t<div class=\"headermright vText\" style=\" float: right\">\n");
      out.write("\t\t\t\t<div style=\"font-size:12px\">您好!欢迎您来到工程师工作纪要</div>\n");
      out.write("\t\t\t\t<div style=\"margin-top: 20px\">\n");
      out.write("\t\t\t\t");

      UserBean userBean = (UserBean) session.getAttribute("userBean");
      if (userBean == null) {

        out.write("\n");
        out.write("\t\t\t\t\t<a href=\"/login.jsp\" target=\"_blank\">登陆</a>\n");
        out.write("\t\t\t\t");

      } else {

        out.write("\n");
        out.write("\t\t\t\t\t<font class=\"fontsong17\">当前用户</font>: <font class=\"fontsong14\">");
        out.print(userBean.getName());
        out.write("</font>, &nbsp;\n");
        out.write(
            "\t\t\t\t\t<font class=\"fontsong17\"><a href=\"/login.jsp?action=logout\">退出</a></font>\n");
        out.write("\t\t\t\t");
      }

      out.write("\n");
      out.write("\t\t\t\t</div>\n");
      out.write("\t\t\t</div>\n");
      out.write("\t\t</div>\n");
      out.write("\t\t<!-- 导航 -->\n");
      out.write("\t\t<div class=\" headernav\">\n");
      out.write("\t\t\t<div class=\" nav\">\n");
      out.write("\t\t\t\t<ul>\n");
      out.write(
          "\t\t\t\t\t<li class=\"navcurrent\"><a href=\"/servlet/Works?howdo=list\">工作纪要</a></li>\n");
      out.write("\t\t\t\t\t<li><a href=\"/servlet/Customer?howdo=list\">客户管理</a></li>\n");
      out.write("\t\t\t\t\t<li><a href=\"/servlet/User?howdo=list\">帐号管理</a></li>\n");
      out.write("\t\t\t\t</ul>\n");
      out.write("\t\t\t</div>\n");
      out.write("\t\t</div>\n");
      out.write("\t\t<div class=\"titleDiv\">工作纪要查看</div>\n");
      out.write("\t\t<div class=\"titleLineDiv\"></div>\n");
      out.write("\t\t<div class=\"addContentDiv\">\n");
      out.write("\t\t\t<table class=\"addContentTable\" border=\"0\" cellspacing=\"0\"\n");
      out.write("\t\t\t\tcellpadding=\"0\">\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"120px\" align=\"right\">客户:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getCustomername());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"120px\" align=\"right\">工程师:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getUsername());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">事件属性:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getLevel());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">事件描述:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      out.print(worksBean.getDescribe());
      out.write("</div>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">二级单位:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getErjidanwei());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">客户联系人:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getKehulianxiren());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">联系方式:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getLianxifangshi());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">联系邮箱:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getLianximail());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">是否转800:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      if (worksBean.isIsphonecall()) {
        out.write('是');
        out.write(' ');
      } else {
        out.write(' ');
        out.write('否');
      }
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">800 case号码:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getPhonecallnumber());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">解决办法:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      out.print(worksBean.getSolution());
      out.write("</div>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">是否关闭:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px \">");
      if (worksBean.getIsclosed() == 1) {
        out.write('关');
        out.write('闭');
        out.write(' ');
      } else {
        out.write(' ');
        out.write('开');
        out.write('启');
      }
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">更新内容:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      if (worksBean.getNewcontent() != null) {
        out.write(' ');
        out.print(worksBean.getNewcontent());
        out.write(' ');
      }
      out.write("</div></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t");

      if (worksBean.getIsclosed() == 1 && worksBean.getClosedate() != null) {

        out.write("\n");
        out.write("\t\t\t\t<tr>\n");
        out.write("\t\t\t\t\t<td align=\"right\">关闭时间:</td>\n");
        out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
        out.print(worksBean.getClosedate());
        out.write("</span></td>\n");
        out.write("\t\t\t\t</tr>\n");
        out.write("\t\t\t\t");
      }

      out.write("\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\"></td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write(
          "\t\t\t\t\t\t<div class=\"divBtn ml20 fl mt20\" onclick=\"window.history.back(-1);\">返回</div></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t</table>\n");
      out.write("\n");
      out.write("\t\t</div>\n");
      out.write("\t\t");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("\r\n");
      out.write("<title>智友汇</title>\r\n");
      out.write("<meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("<meta http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("<meta http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/css.css\" />\r\n");
      out.write("<script type=\"text/javascript\" src=\"/js/jquery.min.js\"></script>\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("\t<div class=\"footer\">\r\n");
      out.write("\t\r\n");
      out.write("\t<div class=\"footerbottom\">\r\n");
      out.write("\t<div style=\"margin-top: 10px;margin-bottom: 30px\">Copyright&copy;2015\r\n");
      out.write("\t\t\t北京恒光数码科技有限公司 版权所有</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\n");
      out.write("\t\t<!-- end .container -->\n");
      out.write("\t</div>\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("  <head>\r\n");
      out.write("    <base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("    \r\n");
      out.write("    <title>实收新增</title>\r\n");
      out.write("    \r\n");
      out.write("\t\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(request.getContextPath());
      out.write("/ecside/css/ecside_style.css\" />\r\n");
      out.write("\t\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/ecside/js/prototype_mini.js\"></script>\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/ecside/js/ecside_msg_utf8_cn.js\"></script>\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/ecside/js/ecside.js\"></script>\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/themes/default/easyui.css\">\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/themes/icon.css\">\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/demo/demo.css\">\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/jquery-1.8.0.min.js\"></script>\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/jquery.easyui.min.js\"></script>\r\n");
      out.write("\t\r\n");
      out.write("\r\n");
      out.write("  </head>\r\n");
      out.write("  <script type=\"text/javascript\">\r\n");
      out.write("  \t\r\n");
      out.write("  \t\r\n");
      out.write("  \t\r\n");
      out.write("  \tfunction initForm(){\r\n");
      out.write("  \t\tvar rs = $('#result').attr('value');\r\n");
      out.write("  \t\t//alert(rs);\r\n");
      out.write("  \t\tif(rs=='1'){\r\n");
      out.write("  \t\t\t$.messager.alert(\"提示\",\"保存成功!\");\r\n");
      out.write("  \t\t\treturn;\r\n");
      out.write("  \t\t}else if(rs=='0'){\r\n");
      out.write("  \t\t\t$.messager.alert(\"提示\",\"保存失败!\");\r\n");
      out.write("  \t\t}else if(rs=='-1'){\r\n");
      out.write("  \t\t\t$.messager.alert(\"提示\",\"Excel解析失败!\");\r\n");
      out.write("  \t\t}\r\n");
      out.write("  \t}\r\n");
      out.write("  \tfunction importRcved(){\r\n");
      out.write("  \t\tvar fileName = $('#file').attr('value');\r\n");
      out.write("  \t\tif(fileName==null || fileName==''){\r\n");
      out.write("  \t\t\talert('请选择导入文件');\r\n");
      out.write("  \t\t\treturn;\r\n");
      out.write("  \t\t}\r\n");
      out.write("  \t\tdocument.forms[0].submit();\r\n");
      out.write("  \t}\r\n");
      out.write("  \tfunction confirm(){\r\n");
      out.write("  \t\tvar arrayTr = $('#ecTable_table tr');\r\n");
      out.write("  \t\tif(arrayTr.length<2){\r\n");
      out.write("  \t\t\talert('界面没有需要导入的记录');\r\n");
      out.write("  \t\t\treturn;\r\n");
      out.write("  \t\t}\r\n");
      out.write("  \t\tdocument.forms[1].submit();\r\n");
      out.write("  \t}\r\n");
      out.write("  </script>\r\n");
      out.write("  \r\n");
      out.write("  <body onload=\"initForm()\" >\r\n");
      out.write("    <input type=\"hidden\" id=\"result\" value=\"");
      out.print(request.getAttribute("result"));
      out.write("\">\r\n");
      out.write("    <table width=\"100%\"><tr>\r\n");
      out.write("    <td width=\"300px\">\r\n");
      out.write("    ");
      if (_jspx_meth_s_005fform_005f0(_jspx_page_context)) return;
      out.write("\t\r\n");
      out.write("    </td>\r\n");
      out.write("    <td align=\"left\">\r\n");
      out.write("    ");
      if (_jspx_meth_s_005fform_005f1(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("   \t</td> \t\r\n");
      out.write("   \t</tr> \r\n");
      out.write("   \t</table>\r\n");
      out.write("   \t  \r\n");
      out.write("   \t  \r\n");
      out.write("   \t  ");
      if (_jspx_meth_ec_005ftable_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("   \t \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)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #7
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<head>\r\n");
      out.write("<base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset= GBK \">\r\n");
      out.write("<title>成衣维修登记列表查询</title>\r\n");
      out.write("\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/themes/default/easyui.css\">\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/themes/icon.css\">\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/demo/demo.css\">\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/jquery-1.8.0.min.js\" charset=\"GBK\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/jquery.easyui.min.js\" charset=\"GBK\"></script>\r\n");
      out.write("\r\n");
      out.write("<script language=\"javascript\" >\r\n");
      out.write("\r\n");
      out.write("//下拉列表选择  店铺编码\r\n");
      out.write("$(function(){\r\n");
      out.write("\t$('#dp').combogrid({\r\n");
      out.write("\t\tpanelWidth:260,\r\n");
      out.write(" \t\tmode:'remote',\r\n");
      out.write("\t\tidField:'depotid',\r\n");
      out.write("\t\ttextField:'dname',\r\n");
      out.write("\t\turl:'rest/getFilterdp/S2',\r\n");
      out.write("\t\tmethod:'post',\r\n");
      out.write("\t \r\n");
      out.write("\t\tcolumns:[[\r\n");
      out.write("\t\t\t{field:'depotid',title:'店铺编号',width:90},\r\n");
      out.write("\t\t\t{field:'dname',title:'店铺名称',width:160},\r\n");
      out.write("\r\n");
      out.write("\t\t]]\r\n");
      out.write("\t});\r\n");
      out.write("});\r\n");
      out.write(" \r\n");
      out.write("\r\n");
      out.write("//普通下拉2   店铺类型\r\n");
      out.write("$(function(){\r\n");
      out.write("\t\t\t$('#zt').combobox({\r\n");
      out.write("\t\t\t\turl:'rest/getFilterzt/S1',\r\n");
      out.write("\t\t\t\tmethod:'post',\r\n");
      out.write("\t\t\t\tvalueField:'bh',\r\n");
      out.write("\t\t\t\ttextField:'mc'\r\n");
      out.write("\t\t\t});\r\n");
      out.write("\t\t});\r\n");
      out.write("\t\t\r\n");
      out.write("\t\t \r\n");
      out.write("//结果列表\r\n");
      out.write("\t$(function(){\r\n");
      out.write("\t\t$('#operateRecordGrid').datagrid({\r\n");
      out.write("\t\t//\ttitle:'DataGrid - ContextMenu',\r\n");
      out.write("\t\t\ticonCls:'icon-save',\r\n");
      out.write("\t\t\twidth:960,\r\n");
      out.write("\t\t\theight:400,\r\n");
      out.write("\t\t\tnowrap: true,\r\n");
      out.write("\t\t\tautoRowHeight: false,\r\n");
      out.write("\t\t\tstriped: true,\r\n");
      out.write("\t\t\tcollapsible:true,\r\n");
      out.write("\t\t\tloadMsg:'正在努力查找数据……',\r\n");
      out.write("\t\t\t//url:'/gclm/web/maintainregister!execute',\r\n");
      out.write("\t\t\turl:'rest/getList/'+$('#status').attr('value'),\r\n");
      out.write("\t\t\tmethod:'post',\r\n");
      out.write("\t\t\tsingleSelect:true,\r\n");
      out.write("\t\t\tonDblClickRow: function() {\r\n");
      out.write("\t\t\t\t\r\n");
      out.write("\t\t\t    var selected = $('#operateRecordGrid').datagrid('getSelected');\r\n");
      out.write("\t\t\t   \r\n");
      out.write("\t\t\t    \r\n");
      out.write("\t\t\t    if (selected){\r\n");
      out.write("\t\t\t    \t\r\n");
      out.write("\t\t\t    \t\r\n");
      out.write("\t\t\t    \twindow.parent.listDbOnclick(selected.guid,selected.zt);\r\n");
      out.write("\t\t\t  /*\r\n");
      out.write("\t\t\t    \tif(selected.zt==0){\r\n");
      out.write(
          "\t\t\t            window.open(\"cm/register/querydetail_register.jsp?guid=\"+selected.guid+\"&zt=\"+selected.zt);\r\n");
      out.write("\t\t\t    \t}else if(selected.zt==1){\r\n");
      out.write(
          "\t\t\t    \t\twindow.open(\"cm/register/querydetail_pjpd.jsp?guid=\"+selected.guid+\"&zt=\"+selected.zt);\r\n");
      out.write("\t\t\t    \t}\r\n");
      out.write("\t\t\t    \telse if(\"3,4,5\".indexOf(selected.zt)>=0){\r\n");
      out.write(
          "\t\t\t    \t\twindow.open(\"cm/register/querydetail_pjpd2.jsp?guid=\"+selected.guid+\"&zt=\"+selected.zt);\r\n");
      out.write("\t\t\t    \t}\r\n");
      out.write("\t\t\t    \telse {\r\n");
      out.write(
          "\t\t\t    \t\twindow.open(\"cm/register/querydetail_noable.jsp?guid=\"+selected.guid+\"&zt=\"+selected.zt);\r\n");
      out.write("\t\t\t    \t}\r\n");
      out.write("\t\t\t    */\t\r\n");
      out.write("\t\t\t    \r\n");
      out.write("\t\t\t   }\r\n");
      out.write("\t\t\t  }\r\n");
      out.write("\t\t\t    \t\r\n");
      out.write("\t\t\t    \t,\r\n");
      out.write("\t\t\tcolumns:[[\r\n");
      out.write("\t\t\t\t{field:'dh',title:'维修单号',width:130,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'ydh',title:'运单号',width:100,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'dpbm',title:'店铺编码',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'dpmc',title:'店铺名称',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'kh',title:'款号',width:100,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'zt',title:'状态',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'djsj',title:'登记时间',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'thrq',title:'退回日期',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'gkxm',title:'顾客姓名',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'vipkh',title:'VIP卡号',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'jjcd',title:'紧急程度',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'wxxz1',title:'维修性质1',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'wtd1',title:'问题点1',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'qy1',title:'起因1',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'xxd1',title:'现象点1',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'bwms',title:'部位描述',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'pjpdsj',title:'品检判定时间',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'zbfhBzrq',title:'总部发货时间',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'pdclfs',title:'判定处理方式',width:120,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'wxsj',title:'维修时间',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'dppj',title:'店铺满意度',width:90,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'thdh',title:'退货单号',width:130,sortable:true},\r\n");
      out.write("\t\t\t\t{field:'posthfhddzbs',title:'POS退货发货单登帐标识',width:140,sortable:true}\r\n");
      out.write("\t\t\t]],\r\n");
      out.write("\t\t\tpagination:true,\r\n");
      out.write("\t\t\trownumbers:true\r\n");
      out.write("\t\t\t   \r\n");
      out.write("        /*    toolbar:[{  \r\n");
      out.write("                id : 'btngjsearch',  \r\n");
      out.write("                text : '搜索',  \r\n");
      out.write("                iconCls : 'icon-search',  \r\n");
      out.write("                handler :searchData,  \r\n");
      out.write("        }]  \r\n");
      out.write("\t\t\t */\r\n");
      out.write("\t\t\t\r\n");
      out.write("\t\t});\r\n");
      out.write("\t//$(\"div.datagrid-toolbar\").html(\"查询关键字:<input type='text' />\");\r\n");
      out.write("\t\tvar p = $('#operateRecordGrid').datagrid('getPager');\r\n");
      out.write("\t\t$(p).pagination({\r\n");
      out.write("\t\t\tonBeforeRefresh:function(){\r\n");
      out.write("\t\t\t\talert('before refresh');\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t});\r\n");
      out.write("\t});\r\n");
      out.write("\t \r\n");
      out.write("\t /*\r\n");
      out.write("    //搜索功能   \r\n");
      out.write("         function reloadgrid (keyword)  {    \r\n");
      out.write(
          "        var queryParams = $('#operateRecordGrid').datagrid('options').queryParams;    \r\n");
      out.write("         queryParams.state = keyword;    \r\n");
      out.write(
          "         $('#operateRecordGrid').datagrid('options').queryParams=queryParams;          \r\n");
      out.write("         $(\"#operateRecordGrid\").datagrid('reload');   \r\n");
      out.write("         \r\n");
      out.write("    } */\r\n");
      out.write("    function searchData(){  \r\n");
      out.write("     \tvar dh,dp,vipkh,     ydh,kh,zt,           dd1,dd2,lx;\r\n");
      out.write("    \t\r\n");
      out.write("    \tdh=document.getElementById(\"dh\").value;\r\n");
      out.write("    \tdp=$('#dp').combobox('getValue');\r\n");
      out.write("    \tvipkh = document.getElementById(\"vipkh\").value;\r\n");
      out.write("    \t\r\n");
      out.write("    \tydh=document.getElementById(\"ydh\").value;\r\n");
      out.write("    \tkh=document.getElementById(\"kh\").value;\r\n");
      out.write("    \tzt=$('#zt').combobox('getValue');\r\n");
      out.write("    \t\r\n");
      out.write("    \tdd1 = $('#dd1').datebox('getValue'); \r\n");
      out.write("    \tdd2=$('#dd2').datebox('getValue');\r\n");
      out.write("    \tlx=$('#lx').combobox('getValue');\r\n");
      out.write("    \t//alert(wxdh+\"===\"+dp+\"====\"+dd1);\r\n");
      out.write("         \r\n");
      out.write(
          "        var query={dh:dh,dp:dp,vipkh:vipkh,    ydh:ydh,kh:kh,zt:zt,           dd1:dd1,dd2:dd2,lx:lx}; //把查询条件拼接成JSON\r\n");
      out.write(" \r\n");
      out.write(
          "        $(\"#operateRecordGrid\").datagrid('options').queryParams=query; //把查询条件赋值给datagrid内部变量\r\n");
      out.write("    \t$(\"#operateRecordGrid\").datagrid('reload'); //重新加载\r\n");
      out.write("       \r\n");
      out.write("         } \r\n");
      out.write(" \r\n");
      out.write("    \r\n");
      out.write("    $(function(){\r\n");
      out.write("        $('#dd1').datebox({\r\n");
      out.write(
          "            formatter: function(date){ return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate(); },\r\n");
      out.write(
          "            parser: function(date){ return new Date(Date.parse(date.replace(/-/g,\"/\"))); }\r\n");
      out.write("            });    \r\n");
      out.write("        })\r\n");
      out.write("    $(function(){\r\n");
      out.write("        $('#dd2').datebox({\r\n");
      out.write(
          "            formatter: function(date){ return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate(); },\r\n");
      out.write(
          "            parser: function(date){ return new Date(Date.parse(date.replace(/-/g,\"/\"))); }\r\n");
      out.write("            });    \r\n");
      out.write("        })\r\n");
      out.write("    \r\n");
      out.write("    </script>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("\t\r\n");
      out.write("\t\r\n");
      out.write("\t<table>\r\n");
      out.write(" \r\n");
      out.write(" <tr>\r\n");
      out.write("\t<td>\r\n");
      out.write("\t</td>\r\n");
      out.write("\r\n");
      out.write("\t<td>\r\n");
      out.write("\t\r\n");
      out.write("\t<div align=\"center\">\r\n");
      out.write("\t<table>\r\n");
      out.write("\t<tr>\r\n");
      out.write("\t<td><input id=\"status\"  type=\"hidden\" value=\"");
      out.print(request.getParameter("status"));
      out.write("\"></td>\r\n");
      out.write("\t</tr>\r\n");
      out.write("\t<tr><td>维修单号</td><td>\r\n");
      out.write(
          "\t<input id=\"dh\"  class=\"easyui-validatebox\" validType=\"minLength[0]\"/>\r\n");
      out.write("\t \r\n");
      out.write(
          "\t</td><td>店铺</td><td><select id=\"dp\" name=\"dept\" style=\"width:135px;\"></select></td><td>客户/VIP号</td><td><input id=\"vipkh\"></input></td><td></td></tr>\r\n");
      out.write("\t\r\n");
      out.write(
          "\t<tr><td>运输单号</td><td><input id=\"ydh\"></input></td><td>款号</td><td><input id=\"kh\"></input></td><td>状态</td><td>\r\n");
      out.write(
          "\t<select id=\"zt\" class=\"easyui-combobox\" name=\"state\" style=\"width:135px;\"></select>\r\n");
      out.write(
          "\t</td><td><a id=\"button\" class=\"easyui-linkbutton\" data-options=\"iconCls:'icon-search'\" onclick=\" searchData()\">查询</a></td></tr>\r\n");
      out.write("\t");
      out.write("\r\n");
      out.write("\t\r\n");
      out.write(
          "\t<tr><td>登记时间</td><td><input id=\"dd1\"  class=\"easyui-datebox\" style=\"width:135px;\" ></input></td><td>- -</td><td><input id=\"dd2\" class=\"easyui-datebox\" style=\"width:135px;\"></input></td>\r\n");
      out.write("\t<td>店铺类型</td>\r\n");
      out.write("\t<td>\r\n");
      out.write(
          "\t<select id=\"lx\" class=\"easyui-combobox\" name=\"state\" style=\"width:135px;height: 50px;\" data-options=\"required:true,panelHeight:'auto'\" >\r\n");
      out.write("\t\t<option value=\"0\" selected>全部</option>\r\n");
      out.write("\t\t<option value=\"1\">自营</option>\r\n");
      out.write("\t\t<option value=\"2\">加盟</option>\r\n");
      out.write("\t</select>\r\n");
      out.write("\t</td>\r\n");
      out.write("\t<td> ");
      out.write("</tr>\r\n");
      out.write("\t\r\n");
      out.write("\t</table>\r\n");
      out.write("\t</div>\r\n");
      out.write("\t<br/><br/>\r\n");
      out.write("\t  \r\n");
      out.write("\t<div>\r\n");
      out.write("\t<table id=\"operateRecordGrid\"></table>\r\n");
      out.write("\t</div>\r\n");
      out.write("\t</td>\r\n");
      out.write("\t<td>\r\n");
      out.write("\t<div align=\"right\"></div>\r\n");
      out.write("\t</td>\r\n");
      out.write("\t</tr>\r\n");
      out.write("\t</table>\r\n");
      out.write("\t\r\n");
      out.write("\t<input id=\"path\" type=\"hidden\" value=\"");
      out.print(path);
      out.write("\" />\r\n");
      out.write("\t\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)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void writeLandingPage(HttpServletRequest request, HttpServletResponse response)
      throws IOException {
    String landingPage = getNewTokenLandingPage();

    /** default to current page * */
    if (landingPage == null) {
      StringBuilder sb = new StringBuilder();

      sb.append(request.getContextPath());
      sb.append(request.getServletPath());

      landingPage = sb.toString();
    }

    /** create auto posting form * */
    StringBuilder sb = new StringBuilder();

    sb.append("<html>\r\n");
    sb.append("<head>\r\n");
    sb.append("<title>OWASP CSRFGuard Project - New Token Landing Page</title>\r\n");
    sb.append("</head>\r\n");
    sb.append("<body>\r\n");
    sb.append("<script type=\"text/javascript\">\r\n");
    sb.append("var form = document.createElement(\"form\");\r\n");
    sb.append("form.setAttribute(\"method\", \"post\");\r\n");
    sb.append("form.setAttribute(\"action\", \"");
    sb.append(landingPage);
    sb.append("\");\r\n");

    /** only include token if needed * */
    if (isProtectedPage(landingPage)) {
      sb.append("var hiddenField = document.createElement(\"input\");\r\n");
      sb.append("hiddenField.setAttribute(\"type\", \"hidden\");\r\n");
      sb.append("hiddenField.setAttribute(\"name\", \"");
      sb.append(getTokenName());
      sb.append("\");\r\n");
      sb.append("hiddenField.setAttribute(\"value\", \"");
      sb.append(getTokenValue(request, landingPage));
      sb.append("\");\r\n");
      sb.append("form.appendChild(hiddenField);\r\n");
    }

    sb.append("document.body.appendChild(form);\r\n");
    sb.append("form.submit();\r\n");
    sb.append("</script>\r\n");
    sb.append("</body>\r\n");
    sb.append("</html>\r\n");

    String code = sb.toString();

    /** setup headers * */
    response.setContentType("text/html");
    response.setContentLength(code.length());

    /** write auto posting form * */
    OutputStream output = null;
    PrintWriter writer = null;

    try {
      output = response.getOutputStream();
      writer = new PrintWriter(output);

      writer.write(code);
      writer.flush();
    } finally {
      Writers.close(writer);
      Streams.close(output);
    }
  }
Beispiel #9
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("  <head>\r\n");
      out.write("    <base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("    \r\n");
      out.write("    <title>我的主页</title>\r\n");
      out.write("    \r\n");
      out.write("\t<meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("\t<meta http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("\t<meta http-equiv=\"expires\" content=\"0\">    \r\n");
      out.write("\t<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("\t<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("\r\n");
      out.write("  </head>\r\n");
      out.write("  \r\n");
      out.write("  <body>\r\n");
      out.write("  \t\t<div style=\"float: left;\">\r\n");
      out.write("       <img src=\"images/welcome.jpg\" />\r\n");
      out.write("       </div>\r\n");
      out.write("       <div style=\"float: left;color: red;font-size: large;\">\r\n");
      out.write("       \r\n");
      out.write("      \t本次登陆时间:");
      out.print(
          new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(session.getAttribute("logintime")));
      out.write("<br/><br/>\r\n");
      out.write("    \r\n");
      out.write("       \t当前用户:");
      out.print(((Tuserinfo) (session.getAttribute("LOGIN_USER"))).getUiusername());
      out.write("<br/><br/>\r\n");
      out.write("       \t\r\n");
      out.write("       \t</div>\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)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
 //	@Override
 public String map(final HttpServletRequest req, final HttpServletResponse res) {
   return req.getContextPath();
 }
Beispiel #11
0
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
      throws IOException, ServletException {
    HttpServletRequest httpRequest = (HttpServletRequest) request;
    HttpServletResponse httpResponse = (HttpServletResponse) response;

    // create input/output dir patterns
    String contextPath = httpRequest.getContextPath();
    if (this.inDirPattern == null) {
      // NOTE: Have to do this here because the context path is not
      //       available in init().
      this.inDirPattern =
          Pattern.compile("^" + escape(contextPath) + escape(this.inDirName) + "/(.*)");
      this.outDirPattern =
          Pattern.compile("^" + escape(contextPath) + "/help/[a-z]{2}(?:_[A-Z]{2})?/.*");
      if (ZimbraLog.webclient.isDebugEnabled()) {
        ZimbraLog.webclient.debug("### indir pattern:  " + this.inDirPattern.pattern());
        ZimbraLog.webclient.debug("### outdir pattern: " + this.outDirPattern.pattern());
      }
    }

    // check to see if we need to redirect this request
    String requestUri = httpRequest.getRequestURI();
    if (this.outDirPattern.matcher(requestUri).matches()) {
      // allow it to go through
      chain.doFilter(request, response);
      return;
    }

    // make list of potential locales to check
    Locale preferredLocale = getLocale(httpRequest);
    String language = preferredLocale.getLanguage();
    String country = preferredLocale.getCountry();
    Locale[] locales = {preferredLocale, country != null ? new Locale(language) : null, Locale.US};
    if (ZimbraLog.webclient.isDebugEnabled()) {
      for (Locale locale : locales) {
        ZimbraLog.webclient.debug("locale: " + locale);
      }
    }

    // find out which version of the requested file exists
    Locale actualLocale = preferredLocale;
    Matcher matcher = this.inDirPattern.matcher(requestUri);
    if (!matcher.matches()) {
      httpResponse.sendError(
          HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Help URL doesn't match input pattern.");
      return;
    }

    if (ZimbraLog.webclient.isDebugEnabled()) {
      ZimbraLog.webclient.debug("### filename: " + matcher.group(1));
    }
    String filename = decode(matcher.group(1)).replace('/', File.separatorChar);
    if (ZimbraLog.webclient.isDebugEnabled()) {
      ZimbraLog.webclient.debug("### filename: " + filename);
    }
    File baseDir = new File(this.context.getRealPath("/"));
    if (ZimbraLog.webclient.isDebugEnabled()) {
      ZimbraLog.webclient.debug("### basedir:  " + baseDir);
    }
    for (Locale locale : locales) {
      if (locale == null) continue;
      File file =
          new File(
              baseDir,
              this.outDirName.replaceAll("\\{locale\\}", locale.toString())
                  + File.separatorChar
                  + filename);
      if (file.exists()) {
        actualLocale = locale;
        break;
      }
    }

    // redirect
    String redirectUrl =
        contextPath
            + this.outDirName.replaceAll("\\{locale\\}", actualLocale.toString())
            + "/"
            + filename;
    if (ZimbraLog.webclient.isDebugEnabled()) {
      ZimbraLog.webclient.debug("redirecting to: " + redirectUrl);
    }
    httpResponse.sendRedirect(redirectUrl);
  }
Beispiel #12
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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("\r\n");
      out.write("\r\n");
      out.write("\r\n");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + ("xsaqjy".equals(request.getServerName())
                  ? "xsaqjy.ljgps.net"
                  : request.getServerName())
              + (request.getServerPort() == 80 ? "" : ":" + request.getServerPort())
              + path
              + "/";
      Long userno = (Long) session.getAttribute("userno"); // 获得当前登录用户的id用户号
      if (userno == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
        return;
      }
      Long admin = (Long) session.getAttribute("adminflag"); // 获得标记当前登录用户是否为数据管理员
      if (admin == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
      }
      Long dwtype = (Long) session.getAttribute("dwtype"); // 获得当前登录用户所在单位类型 0代表交警  1代表货运公司
      if (dwtype == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
      }
      String username = (String) request.getSession().getAttribute("username");
      if (username == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
      }
      List<String> list = (List<String>) session.getAttribute("list"); // 获得权限的集合
      if (list == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
      }
      Long userid = (long) Integer.parseInt((String) request.getSession().getAttribute("driverid"));
      if (userid == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
        return;
      }
      Object u = request.getSession().getAttribute("onlineuser"); // 获得当前登录用户的对象
      if (u == null) {
        response.sendRedirect(basePath + "page/admin/login.jsp");
      } // 假如获得不到用户,就重新定向到登录页面
      session.setAttribute("basePath", basePath); // 把basepath放到session中以便所有的页面使用

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!-- 获取当前日期,时间,星期 -->\r\n");

      String week = "";
      if (new Date().getDay() == 0) week = "星期日";
      if (new Date().getDay() == 1) week = "星期一";
      if (new Date().getDay() == 2) week = "星期二";
      if (new Date().getDay() == 3) week = "星期三";
      if (new Date().getDay() == 4) week = "星期四";
      if (new Date().getDay() == 5) week = "星期五";
      if (new Date().getDay() == 6) week = "星期六";
      java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
      java.util.Date currentTime = new java.util.Date(); // 得到当前系统时间
      String date1 = formatter.format(currentTime); // 将日期时间格式化
      String date2 = currentTime.toString(); // 将Date型日期时间转换成字符串形式

      out.write("\r\n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<base href=\"");
      out.print(basePath);
      out.write("\" />\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("<title>机动车网上交通安全宣传教育监管平台</title>\r\n");
      out.write(
          "<link href=\"page/admin/css/style.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
      out.write(
          "<script type=\"text/javascript\" src=\"page/admin/javascript/jquery.min.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\">\r\n");
      out.write("\t$(function() {\r\n");
      out.write("\t\t//setMenuHeight\r\n");
      out.write("\t\t$('.menu').height($(window).height() - 56 - 27 - 26);\r\n");
      out.write("\t\t$('.sidebar').height($(window).height() - 56 - 27 - 26);\r\n");
      out.write("\t\t$('.page').height($(window).height() - 56 - 27 - 26);\r\n");
      out.write("\t\t$('.page iframe').width($(window).width() - 15 - 168);\r\n");
      out.write("\t\t$('.subMenu a[href=\"#\"]').next('ul').toggle();\r\n");
      out.write("\t\t//menu on and off\r\n");
      out.write("\t\t$('.btn').click(function() {\r\n");
      out.write("\t\t\t$('.menu').toggle();\r\n");
      out.write("\r\n");
      out.write("\t\t\tif ($(\".menu\").is(\":hidden\")) {\r\n");
      out.write("\t\t\t\t$('iframe').width($(window).width() - 15 + 5);\r\n");
      out.write("\t\t\t} else {\r\n");
      out.write("\t\t\t\t$('iframe').width($(window).width() - 15 - 168);\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t});\r\n");
      out.write(" \r\n");
      out.write("\t\t//\r\n");
      out.write("\t\t$('.subMenu a[href=\"#\"]').click(function() {\r\n");
      out.write("\t\t\t$(this).next('ul').toggle();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t});\r\n");
      out.write("\t});\r\n");
      out.write("\t\r\n");
      out.write("\tfunction clickmenu(topage){\r\n");
      out.write("\t\t $('iframe')[0].src = topage;\r\n");
      out.write("\t}\r\n");
      out.write("</script>\r\n");
      out.write("\r\n");
      out.write("<!-- 后台页面权限的分配 -->\r\n");
      out.write("<script type=\"text/javascript\">\r\n");
      out.write("//页面初始化进行\r\n");
      out.write("window.onload = function() \r\n");
      out.write("{\r\n");
      out.write("\tif(\"");
      out.print(admin);
      out.write("\" == \"1\")//数据管理员的id号设置为0,当id号为0时,拥有一切权限\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\t$(\"li\").show();\r\n");
      out.write("\t\t\t$(\"#otherreprimand\").remove();\r\n");
      out.write("\t\t\t$(\"#driverreprimand\").remove();\r\n");
      out.write("\t\t\t\r\n");
      out.write("\t\t}\r\n");
      out.write("\telse\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t$(\"li\").hide();\r\n");
      out.write("\t\t$(\"#subMenu\").show();\r\n");
      out.write("\t\t");

      if (dwtype == 0) // 当登录的账号为交警部门时,默认的显示前台页面的8个模块对应的后台数据管理
      {

        out.write("\r\n");
        out.write("\t\t    $(\"#firstpage\").show();\r\n");
        out.write("\t\t\t$(\"#rulenmanage\").show();\r\n");
        out.write("\t\t\t$(\"#edunmanage\").show();\r\n");
        out.write("\t\t\t$(\"#baseinfo\").show();\r\n");
        out.write("\t\t\t$(\"#policeorgmanage\").show();\r\n");
        out.write("\t\t\t$(\"#companymanage\").show();\r\n");
        out.write("\t\t\t$(\"#carmanage\").show();\r\n");
        out.write("\t\t\t$(\"#drivermanage\").show();\r\n");
        out.write("\t\t\t$(\"#rulenmanage\").show();\r\n");
        out.write("\t\t\t$(\"#branchmanage\").show();\r\n");
        out.write("\t\t\t$(\"#safenoticemanage\").show();\r\n");
        out.write("\t\t\t$(\"#meetnoticemanage\").show();\r\n");
        out.write("\t\t\t$(\"#interchangemanage\").show();\r\n");
        out.write("\t\t\t$(\"#micromessagemanage\").show();\r\n");
        out.write("\t\t\t$(\"#editpassword\").show();\r\n");
        out.write("\t\t\t$(\"#reprimand\").show();\r\n");
        out.write("\t\t\t$(\"#carlist\").show();\r\n");
        out.write("\t");
      }
      out.write("\r\n");
      out.write("\t\r\n");
      out.write("\t");

      if (dwtype == 1) // 当登录的账号为货运部门时,默认显示货运公司对应的后台数据管理
      {

        out.write("\r\n");
        out.write("\t    $(\"#firstpage\").show();\r\n");
        out.write("\t\t$(\"#baseinfo\").show();\r\n");
        out.write("\t\t$(\"#interchangemanage\").show();\r\n");
        out.write("\t\t$(\"#editpassword\").show();\r\n");
        out.write("\t\t$(\"#safelearn\").show();\r\n");
        out.write("\t\t$(\"#otherreprimand\").show();\r\n");
        out.write("\t\t$(\"#drivermanage\").show();\r\n");
        out.write("\t\t$(\"#micromessagemanage\").show();\r\n");
        out.write("\t\t$(\"#carmanage\").show();\r\n");
        out.write("\t\t$(\"#companymanage\").show();\r\n");
      }
      out.write("\r\n");
      out.write("\r\n");

      if (dwtype == 2) // 当登录的账号为货运部门的驾驶员时,默认显示货运公司驾驶员对应的后台数据管理
      {

        out.write("\r\n");
        out.write("    $(\"#firstpage\").show();\r\n");
        out.write("\t$(\"#baseinfo\").show();\r\n");
        out.write("\t$(\"#drivermanage\").show();\r\n");
        out.write("\t$(\"#editpassword\").show();\r\n");
        out.write("\t$(\"#interchangemanage\").show();\r\n");
        out.write("\t$(\"#safelearn\").show();\r\n");
        out.write("\t$(\"#micromessagemanage\").show();\r\n");
        out.write("\t$(\"#driverreprimand\").show();\r\n");
      }
      out.write("\r\n");
      out.write("\t\t");

      if (u != null) {
        String string = "";
        for (int i = 0; i < list.size(); i++) {
          string = list.get(i);

          out.write("\r\n");
          out.write("\t\t$(\"#");
          out.print(string);
          out.write("\").show();\r\n");
          out.write("\t\t");
        }
      }
      out.write("\r\n");
      out.write("      }\r\n");
      out.write("}\r\n");
      out.write("</script>\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write(
          "\t<table border=\"0\" width=\"100%\" height=\"100%\"style=\"margin: 0; padding: 0; background-color: #198bc9\">\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t\t<td colspan=\"3\">\r\n");
      out.write("\t\t\t\t<div id=\"header\">\r\n");
      out.write(
          "\t\t\t\t<table border=\"0\" width=\"100%\" height=\"100%\" style=\"margin: 0; padding: 0;\">\r\n");
      out.write("\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<td width=\"50%\" style=\"text-align:left\">\r\n");
      out.write("\t\t\t\t<div class=\"logo fleft\">&nbsp;</div>\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t<td width=\"30%\"></td>\r\n");
      out.write("\t\t\t\t<td width=\"20%\" style=\"text-align:right\">\r\n");
      out.write("\t\t\t\t<div  class=\"logoright fleft\" align=\"right\">&nbsp;</div>\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t</table>\r\n");
      out.write("\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t\t<td colspan=\"3\" align=\"left\">\r\n");
      out.write("\t\t\t<div class=\"logofont\" style=\"margin-left:25px\">\r\n");
      out.write(
          "\t\t\t<table border=\"0\" width=\"100%\" height=\"100%\" style=\"margin: 0; padding: 0;\">\r\n");
      out.write("\t\t\t<tr><td align=\"left\">\r\n");
      out.write("\t\t\t<font>用户:");
      out.print(username);
      out.write("&nbsp;&nbsp;时间:");
      out.print(date1);
      out.write("&nbsp;&nbsp;");
      out.print(week);
      out.write("&nbsp;&nbsp;</font>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t\t<td align=\"right\">\r\n");
      out.write(
          "\t\t\t<a href=\"loginout.action\"><font color=\"#FFFFF0\">退出&nbsp;&nbsp;</font></a>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t\t</table>\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t\t<td width=\"168px\">\r\n");
      out.write("\t\t\t\t<div class=\"menu fleft\">\r\n");
      out.write("\t\t\t\t\t<ul>\r\n");
      out.write("\t\t\t\t\t\t<li class=\"subMenuTitle\" id=\"subMenu\">机动车网安教后台管理</li>\r\n");
      out.write("\t\t\t\t\t\t<li class=\"subMenu\" id=\"firstpage\">首页设置</li>\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"stationmanage\"><a href=\"#\">参数配置</a>\r\n");
      out.write("\t\t\t\t\t\t\t<ul>\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<li><a href=\"javascript:clickmenu('page/admin/page/config_viewConfigList.action')\">网站信息</a>\r\n");
      out.write("\t\t\t\t\t\t\t\t</li>\r\n");
      out.write("\t\t\t\t\t\t\t</ul></li>\r\n");
      out.write("\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"accountmanage\"><a href=\"#\">系统管理</a>\r\n");
      out.write("\t\t\t\t\t\t\t<ul>\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<li id=\"rolemanage\"><a href=\"javascript:clickmenu('page/admin/page/role_viewRoleList.action')\">角色管理</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<li id=\"accountmanage\"><a href=\"javascript:clickmenu('page/admin/page/account_viewAccountList.action')\">账号管理</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<li id=\"permisionmanage\"><a href=\"javascript:clickmenu('page/admin/page/permission_viewPermissionList.action')\">权限管理</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<li  id=\"areamanage\"><a href=\"javascript:clickmenu('page/admin/page/areaback_viewAreaList.action')\">地域管理</a></li>\r\n");
      out.write("\t\t\t\t\t\t\t</ul>\r\n");
      out.write("\t\t\t\t\t\t</li>\r\n");
      out.write("\t\t\t\t\t\t\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"rulenmanage\"><a href=\"javascript:clickmenu('page/admin/page/ruleback_viewRuleList.action')\">交通法规</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"edunmanage\"><a href=\"javascript:clickmenu('page/admin/page/eduback_viewEduList.action')\">宣教中心</a></li>\r\n");
      out.write("\r\n");
      out.write("\t\t\t\t\t <li class=\"subMenu\" id=\"baseinfo\"><a href=\"#\">基本信息</a>\r\n");
      out.write("\t\t\t\t\t\t <ul>\r\n");
      out.write(
          "\t\t\t\t\t\t    <!-- <li id=\"policeorgmanage\"><a href=\"javascript:clickmenu('page/admin/page/orgback_viewPoliceOrgList.action')\">交警部门</a></li> -->\r\n");
      out.write(
          "\t\t\t\t\t\t    <li  id=\"orgmanage\"><a href=\"javascript:clickmenu('page/admin/page/policeorgback_viewPoliceOrgList.action')\">交警部门</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t    <li class=\"subMenu\" id=\"carlist\"><a href=\"javascript:clickmenu('page/admin/page/policeback_viewPoliceList.action')\">交警信息</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t\t<li id=\"companymanage\"><a href=\"javascript:clickmenu('page/admin/page/companyback_viewCompanyList.action')\">企业安全组</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t\t<li id=\"carmanage\"><a href=\"javascript:clickmenu('page/admin/page/carback_viewCarList.action')\">车辆管理</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t\t<li id=\"drivermanage\"><a href=\"javascript:clickmenu('page/admin/page/driverback_viewDriverList.action')\">驾驶员管理</a></li>\r\n");
      out.write(
          "\t\t\t\t\t\t  \t<li class=\"subMenu\" id=\"editpassword\"><a href=\"javascript:clickmenu('page/admin/page/account_viewPassword.action?id=");
      out.print(userid);
      out.write("')\">修改密码</a></li>\r\n");
      out.write("\t\t\t\t\t\t  </ul>\r\n");
      out.write("\t\t\t\t\t </li>\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"rulenmanage\"><a href=\"javascript:clickmenu('page/admin/page/illegalback_viewIllegalList.action')\">违法查询</a></li>\r\n");
      out.write("\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"branchmanage\"><a href=\"javascript:clickmenu('page/admin/page/branchback_viewBranchList.action')\">快速处理点</a></li>\r\n");
      out.write("\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"safenoticemanage\"><a href=\"javascript:clickmenu('page/admin/page/safenoticeback_viewSafeNoticeList.action')\">安全提醒</a></li>\r\n");
      out.write("\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"meetnoticemanage\"><a href=\"javascript:clickmenu('page/admin/page/meetnoticeback_viewMeetNoticeList.action')\">会议通知</a></li>\r\n");
      out.write("\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"safelearn\"><a href=\"javascript:clickmenu('page/admin/page/safelearnback_viewEduList.action')\">安全教育学习</a></li>\r\n");
      out.write("\t\t\t\t\t\t\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"reprimand\"><a href=\"javascript:clickmenu('page/admin/page/reprimandback_viewReprimandList.action')\">通报批评</a></li>\r\n");
      out.write("\t\t\t\t\t\r\n");
      out.write(
          "\t\t\t\t\t    <li class=\"subMenu\" id=\"otherreprimand\"><a href=\"javascript:clickmenu('page/admin/page/otherreprimandback_viewReprimandList.action')\">通报批评</a></li>\r\n");
      out.write("\t\t\t\t\t    \r\n");
      out.write(
          "\t\t\t\t\t    <li class=\"subMenu\" id=\"driverreprimand\"><a href=\"javascript:clickmenu('page/admin/page/otherreprimandback_showDriverReprimand.action')\">通报批评</a></li>\r\n");
      out.write("\t\t\t\t\t   \r\n");
      out.write(
          "\t\t\t\t\t    <li class=\"subMenu\" id=\"interchangemanage\"><a href=\"javascript:clickmenu('page/admin/page/interchangeback_viewInterchangeList.action')\">问题答疑</a></li>\r\n");
      out.write("\r\n");
      out.write(
          "\t\t\t\t\t\t<li class=\"subMenu\" id=\"micromessagemanage\"><a href=\"javascript:clickmenu('page/admin/page/micromessage/micromessagelist.jsp')\">微博互动</a></li>\r\n");
      out.write("\t\t\t\t\t\r\n");
      out.write("\t\t\t\t\t</ul>\r\n");
      out.write("\t\t\t\t\t\r\n");
      out.write("\t\t\t\t</div>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t\t<td width=\"5px\">\r\n");
      out.write("\t\t\t\t<div class=\"sidebar fleft\">\r\n");
      out.write("\t\t\t\t\t<div class=\"btn\"></div>\r\n");
      out.write("\t\t\t\t</div>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t\t<td class=\"page\"><iframe width=\"100%\" scrolling=\"auto\"\r\n");
      out.write("\t\t\t\t\theight=\"100%\" FRAMEBORDER=0 style=\"border: medium none;\"\r\n");
      out.write(
          "\t\t\t\t\tsrc=\"/TrafficPolice/page/admin/page/Startpage.jsp\" id=\"rightMain\"\r\n");
      out.write("\t\t\t\t\tname=\"right\"></iframe>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t\t<td colspan=\"3\"><div id=\"footer\"></div></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t</table>\r\n");
      out.write("</body>\r\n");
      out.write("\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #13
0
 /**
  * Return the request URL relative to the server (i.e., starting with the context path).
  *
  * @param req request
  * @return URL relative to the server
  */
 public static String getReletiveURL(HttpServletRequest req) {
   return req.getContextPath() + req.getServletPath() + req.getPathInfo();
 }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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');
      out.write('\n');
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";
      pageContext.setAttribute("httpProtocol", request.getScheme());

      out.write('\r');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f0(_jspx_page_context)) return;
      out.write('\r');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f1(_jspx_page_context)) return;
      out.write('\r');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f2(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<div class=\"table-list\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t<thead>\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<th class=\"pdL\">归属公众号</th>\r\n");
      out.write("\t\t\t\t<th>头像</th>\r\n");
      out.write("\t\t\t\t<th>关注状态</th>\r\n");
      out.write("\t\t\t\t<th>昵称</th>\r\n");
      out.write("\t\t\t\t<th>地区</th>\r\n");
      out.write("\t\t\t\t<th>姓名</th>\r\n");
      out.write("\t\t\t\t<th>手机号</th>\r\n");
      out.write("\t\t\t\t<th>绑定状态</th>\r\n");
      out.write("\t\t\t\t<th class=\"pdR\">分组</th>\r\n");
      out.write("\t\t\t\t<!-- <th>活跃度</th> -->\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t</thead>\r\n");
      out.write("\t\t<tbody>\r\n");
      out.write("\t\t\t");
      if (_jspx_meth_c_005fforEach_005f0(_jspx_page_context)) return;
      out.write("\t\t\t\r\n");
      out.write("\t\t</tbody>\r\n");
      out.write("\t</table>\r\n");
      out.write("</div>\r\n");
      out.write(
          (java.lang.String)
              org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                  "${pageInfo.html}",
                  java.lang.String.class,
                  (PageContext) _jspx_page_context,
                  null,
                  false));
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #15
0
  /**
   * Show details about the request
   *
   * @param servlet used to get teh servlet context, may be null
   * @param req the request
   * @return string showing the details of the request.
   */
  public static String showRequestDetail(HttpServlet servlet, HttpServletRequest req) {
    StringBuilder sbuff = new StringBuilder();

    sbuff.append("Request Info\n");
    sbuff.append(" req.getServerName(): ").append(req.getServerName()).append("\n");
    sbuff.append(" req.getServerPort(): ").append(req.getServerPort()).append("\n");
    sbuff.append(" req.getContextPath:").append(req.getContextPath()).append("\n");
    sbuff.append(" req.getServletPath:").append(req.getServletPath()).append("\n");
    sbuff.append(" req.getPathInfo:").append(req.getPathInfo()).append("\n");
    sbuff.append(" req.getQueryString:").append(req.getQueryString()).append("\n");
    sbuff
        .append(" getQueryStringDecoded:")
        .append(EscapeStrings.urlDecode(req.getQueryString()))
        .append("\n");
    /*try {
      sbuff.append(" getQueryStringDecoded:").append(URLDecoder.decode(req.getQueryString(), "UTF-8")).append("\n");
    } catch (UnsupportedEncodingException e1) {
      e1.printStackTrace();
    }*/
    sbuff.append(" req.getRequestURI:").append(req.getRequestURI()).append("\n");
    sbuff.append(" getRequestBase:").append(getRequestBase(req)).append("\n");
    sbuff.append(" getRequestServer:").append(getRequestServer(req)).append("\n");
    sbuff.append(" getRequest:").append(getRequest(req)).append("\n");
    sbuff.append("\n");

    sbuff.append(" req.getPathTranslated:").append(req.getPathTranslated()).append("\n");
    String path = req.getPathTranslated();
    if ((path != null) && (servlet != null)) {
      ServletContext context = servlet.getServletContext();
      sbuff.append(" getMimeType:").append(context.getMimeType(path)).append("\n");
    }
    sbuff.append("\n");
    sbuff.append(" req.getScheme:").append(req.getScheme()).append("\n");
    sbuff.append(" req.getProtocol:").append(req.getProtocol()).append("\n");
    sbuff.append(" req.getMethod:").append(req.getMethod()).append("\n");
    sbuff.append("\n");
    sbuff.append(" req.getContentType:").append(req.getContentType()).append("\n");
    sbuff.append(" req.getContentLength:").append(req.getContentLength()).append("\n");

    sbuff.append(" req.getRemoteAddr():").append(req.getRemoteAddr());
    try {
      sbuff
          .append(" getRemoteHost():")
          .append(java.net.InetAddress.getByName(req.getRemoteHost()).getHostName())
          .append("\n");
    } catch (java.net.UnknownHostException e) {
      sbuff.append(" getRemoteHost():").append(e.getMessage()).append("\n");
    }
    sbuff.append(" getRemoteUser():").append(req.getRemoteUser()).append("\n");

    sbuff.append("\n");
    sbuff.append("Request Parameters:\n");
    Enumeration params = req.getParameterNames();
    while (params.hasMoreElements()) {
      String name = (String) params.nextElement();
      String values[] = req.getParameterValues(name);
      if (values != null) {
        for (int i = 0; i < values.length; i++) {
          sbuff
              .append("  ")
              .append(name)
              .append("  (")
              .append(i)
              .append("): ")
              .append(values[i])
              .append("\n");
        }
      }
    }
    sbuff.append("\n");

    sbuff.append("Request Headers:\n");
    Enumeration names = req.getHeaderNames();
    while (names.hasMoreElements()) {
      String name = (String) names.nextElement();
      Enumeration values = req.getHeaders(name); // support multiple values
      if (values != null) {
        while (values.hasMoreElements()) {
          String value = (String) values.nextElement();
          sbuff.append("  ").append(name).append(": ").append(value).append("\n");
        }
      }
    }
    sbuff.append(" ------------------\n");

    return sbuff.toString();
  }
Beispiel #16
0
  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, 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");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\r\n");
      out.write("\r\n");

      response.reset();
      response.setContentType("application/msexcel");
      response.setHeader("Content-disposition", "inline;filename=tqgbstudent.xls"); // 定义文件名
      DecimalFormat f = new DecimalFormat("#,##0.00");
      HSSFWorkbook wb = new HSSFWorkbook();
      HSSFSheet sheet = wb.createSheet("sheet1");
      String[] id = request.getParameterValues("id");
      String[] name = request.getParameterValues("name");
      String[] xuehao = request.getParameterValues("xuehao");
      String[] sex = request.getParameterValues("sex");
      String[] sszy = request.getParameterValues("sszy");
      String[] nbzy = request.getParameterValues("nbzy");
      String[] sd = request.getParameterValues("sd");
      String[] nbbd = request.getParameterValues("nbbd");
      String[] cjpm = request.getParameterValues("cjpm");
      String[] beizhu = request.getParameterValues("beizhu");
      String[] tel = request.getParameterValues("tel");

      // 以下以写表头
      // 表头为第一行
      HSSFRow row = sheet.createRow((short) 0);
      // 定义10列
      HSSFCell cell1 = row.createCell((short) 0);
      HSSFCell cell2 = row.createCell((short) 1);
      HSSFCell cell3 = row.createCell((short) 2);
      HSSFCell cell4 = row.createCell((short) 3);
      HSSFCell cell5 = row.createCell((short) 4);
      HSSFCell cell6 = row.createCell((short) 5);
      HSSFCell cell7 = row.createCell((short) 6);
      HSSFCell cell8 = row.createCell((short) 7);
      HSSFCell cell9 = row.createCell((short) 8);
      HSSFCell cell10 = row.createCell((short) 9);
      HSSFCell cell11 = row.createCell((short) 10);

      cell1.setEncoding((short) 1);
      cell1.setCellType(1);
      cell2.setEncoding((short) 1);
      cell2.setCellType(1);
      cell3.setEncoding((short) 1);
      cell3.setCellType(1);
      cell4.setEncoding((short) 1);
      cell4.setCellType(1);
      cell5.setEncoding((short) 1);
      cell5.setCellType(0);
      cell6.setEncoding((short) 1);
      cell6.setCellType(1);
      cell7.setEncoding((short) 1);
      cell7.setCellType(1);
      cell8.setEncoding((short) 1);
      cell8.setCellType(1);
      cell9.setEncoding((short) 1);
      cell9.setCellType(1);
      cell10.setEncoding((short) 1);
      cell10.setCellType(1);
      cell11.setEncoding((short) 1);
      cell11.setCellType(1);
      // 定义表头的内容
      cell1.setCellValue("序号");
      cell2.setCellValue("姓名");
      cell3.setCellValue("学号");
      cell4.setCellValue("性别");
      cell5.setCellValue("硕士专业");
      cell6.setCellValue("拟报博士专业");
      cell7.setCellValue("原硕导");
      cell8.setCellValue("拟报博导");
      cell9.setCellValue("学位课加权成绩排名");
      cell10.setCellValue("备注");
      cell11.setCellValue("联系方式");

      for (int i = 0; i < name.length; i++) {
        // 定义数据从第二行开始
        row = sheet.createRow((short) i + 1);
        cell1 = row.createCell((short) 0);
        cell2 = row.createCell((short) 1);
        cell3 = row.createCell((short) 2);
        cell4 = row.createCell((short) 3);
        cell5 = row.createCell((short) 4);
        cell6 = row.createCell((short) 5);
        cell7 = row.createCell((short) 6);
        cell8 = row.createCell((short) 7);
        cell9 = row.createCell((short) 8);
        cell10 = row.createCell((short) 9);
        cell11 = row.createCell((short) 10);

        cell1.setEncoding((short) 1);
        cell1.setCellType(1);
        cell2.setEncoding((short) 1);
        cell2.setCellType(1);
        cell3.setEncoding((short) 1);
        cell3.setCellType(1);
        cell4.setEncoding((short) 1);
        cell4.setCellType(1);
        cell5.setEncoding((short) 1);
        cell5.setCellType(0);
        cell6.setEncoding((short) 1);
        cell6.setCellType(1);
        cell7.setEncoding((short) 1);
        cell7.setCellType(1);
        cell8.setEncoding((short) 1);
        cell8.setCellType(1);
        cell9.setEncoding((short) 1);
        cell9.setCellType(1);
        cell10.setEncoding((short) 1);
        cell10.setCellType(1);
        cell11.setEncoding((short) 1);
        cell11.setCellType(1);

        // 填充内容
        cell1.setCellValue(id[i]);
        cell2.setCellValue(name[i]);
        cell3.setCellValue(xuehao[i]);
        cell4.setCellValue(sex[i]);
        cell5.setCellValue(sszy[i]);
        cell6.setCellValue(nbzy[i]);
        cell7.setCellValue(sd[i]);
        cell8.setCellValue(nbbd[i]);
        cell9.setCellValue(cjpm[i]);
        cell10.setCellValue(beizhu[i]);
        cell11.setCellValue(tel[i]);
      }
      wb.write(response.getOutputStream());
      response.getOutputStream().flush();
      response.getOutputStream().close();

    } 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);
    }
  }
Beispiel #17
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      response.setContentType("text/html;charset=GB2312");
      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("<xmp>\r\n");
      out.write("\r\n");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("  <head>\r\n");
      out.write("    <base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("    \r\n");
      out.write("    <title>计算立方</title>\r\n");
      out.write("    \r\n");
      out.write("\t<meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("\t<meta http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("\t<meta http-equiv=\"expires\" content=\"0\">    \r\n");
      out.write("\t<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("\t<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("\t<!--\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\">\r\n");
      out.write("\t-->\r\n");
      out.write("\r\n");
      out.write("  </head>\r\n");
      out.write("  \r\n");
      out.write("  <body>\r\n");
      out.write("  <h3>计算立方</h3>\r\n");
      out.write("\t<div>\r\n");
      out.write("\t\t<form action=\"./lab02/calculate.jsp\">\r\n");
      out.write("\t  \t\t<input name=\"input_number\" type=\"text\" value=\"\" size=\"13\" \r\n");
      out.write("\t  \t\t onkeyup=\"this.value=this.value.replace(/\\D/g,'')\" \r\n");
      out.write("\t  \t\t onafterpaste=\"this.value=this.value.replace(/\\D/g,'')\" /><br>\r\n");
      out.write("\t  \t\t<input type=\"reset\" value=\"重置\"> \r\n");
      out.write("\t  \t\t<input type=\"submit\" value=\"提交\">\r\n");
      out.write("\t\t</form>\r\n");
      out.write("\t</div><br/>\r\n");
      out.write("  </body>\r\n");
      out.write("</html>\r\n");
      out.write("</xmp>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    boolean orderCompleted = true;

    // Get the user's session and shopping cart
    HttpSession session = request.getSession(true);
    ResourceBundle messages = (ResourceBundle) session.getAttribute("messages");
    ShoppingCart cart = (ShoppingCart) session.getAttribute("cart");

    if (cart == null) {
      cart = new ShoppingCart();
      session.setAttribute("cart", cart);
    }

    // Update the inventory
    try {
      utx.begin();
      bookDB.buyBooks(cart);
      utx.commit();
    } catch (Exception ex) {
      try {
        utx.rollback();
      } catch (Exception e) {
        System.out.println("Rollback failed: " + e.getMessage());
      }

      System.err.println(ex.getMessage());
      orderCompleted = false;
    }

    // Payment received -- invalidate the session
    session.invalidate();

    // set content type header before accessing the Writer
    response.setContentType("text/html");
    response.setBufferSize(8192);

    PrintWriter out = response.getWriter();

    // then write the response
    out.println(
        "<html>" + "<head><title>" + messages.getString("TitleReceipt") + "</title></head>");

    // Get the dispatcher; it gets the banner to the user
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/banner");

    if (dispatcher != null) {
      dispatcher.include(request, response);
    }

    if (orderCompleted) {
      out.println("<h3>" + messages.getString("ThankYou") + request.getParameter("cardname") + ".");
    } else {
      out.println("<h3>" + messages.getString("OrderError"));
    }

    out.println(
        "<p> &nbsp; <p><strong><a href=\""
            + response.encodeURL(request.getContextPath())
            + "/bookstore\">"
            + messages.getString("ContinueShopping")
            + "</a> &nbsp; &nbsp; &nbsp;"
            + "</body></html>");
    out.close();
  }
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
      throws IOException, ServletException {

    //		权限判断
    StringBuffer sb = new StringBuffer();
    String actionType = null;
    String queryString = null;
    String userid = null;
    String isCanAccess = "1";
    HttpServletRequest hrequest = (HttpServletRequest) request;
    String strContext = hrequest.getContextPath();

    if (request instanceof HttpServletRequest) {

      // 获取用户信息
      userid = (String) hrequest.getSession().getAttribute("AuthorizedUserID");

      strContext = hrequest.getContextPath();
      queryString = hrequest.getQueryString(); // 整个参数串
      actionType = hrequest.getParameter("actionType"); // 一般操作
      if (actionType == null) {
        actionType = hrequest.getParameter("formSN"); // 针对查询的操作
        if (actionType != null) {
          actionType = "formSN=" + actionType;
        }
      } else {
        actionType = "actionType=" + actionType;
      }
    }

    if (actionType != null) { // 如果参数不为空,则判断权限,通过存储过程判断
      DBConnectionManager dbManager = new DBConnectionManager();
      CallableStatement cstmt = null;
      Connection conn = null;
      try {
        conn = dbManager.getConnection();
        String query = "{call pkg_security.userAccessFunction(?,?,?,?)}";
        cstmt = conn.prepareCall(query);
        cstmt.registerOutParameter(1, OracleTypes.VARCHAR);
        cstmt.setString(2, userid);
        cstmt.setString(3, actionType == null ? null : actionType.trim());
        cstmt.setString(4, queryString == null ? null : queryString.trim());
        cstmt.execute();
        isCanAccess = cstmt.getString(1);

      } catch (SQLException e) {
        e.printStackTrace();
      } finally {
        try {
          if (cstmt != null) {
            cstmt.close();
          }
        } catch (Exception ex) {
          if (conn != null)
            try {
              conn.close();
            } catch (SQLException e1) {
              e1.printStackTrace();
            }
        }
        if (conn != null)
          try {
            conn.close();
          } catch (SQLException e1) {
            e1.printStackTrace();
          }
      }
    }

    // 如果没有权限,定位到提示页面。
    if (!isCanAccess.equals("1")) {
      HttpServletResponse out = (HttpServletResponse) response;
      out.sendRedirect(strContext + "/common/erroraccess.jsp");
      return;
    } else {

      // 汉字问题
      HttpServletRequest httpRequest = (HttpServletRequest) request;
      httpRequest.setCharacterEncoding(encoding);
      //  chain.doFilter(request, response);

      // 压缩传输

      HttpServletResponse httpResponse = (HttpServletResponse) response;
      String uri = httpRequest.getRequestURI();

      String transferEncoding = getGZIPEncoding((HttpServletRequest) request);
      if (transferEncoding == null) {
        setResponseHeader(httpResponse, uri, transferEncoding);
        chain.doFilter(request, response);
      } else {
        if (!uri.endsWith("dd.xml")) // 不处理的有哪些??????
        {
          chain.doFilter(request, response);
        } else {
          System.out.println("FrameworkFilter::  Filter handle dd.xml");
          setResponseHeader(httpResponse, uri, transferEncoding);
          httpResponse.setHeader("Content-Encoding", transferEncoding);
          GZIPEncodableResponse wrappedResponse =
              new GZIPEncodableResponse((HttpServletResponse) response);
          chain.doFilter(request, wrappedResponse);
          wrappedResponse.flush();
        }
      }
    }

    //		 Pass control on to the next filter
    // chain.doFilter(request, response);

  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    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 {
      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');
      out.write('\n');
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";
      pageContext.setAttribute("httpProtocol", request.getScheme());

      out.write('\r');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f0(_jspx_page_context)) return;
      out.write('\r');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f1(_jspx_page_context)) return;
      out.write('\r');
      out.write('\n');
      if (_jspx_meth_c_005fset_005f2(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      if (_jspx_meth_c_005fforEach_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("\r\n");
      if (_jspx_meth_c_005fif_005f6(_jspx_page_context)) return;
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #21
0
 private String extractServletPath(HttpServletRequest pReq) {
   return pReq.getRequestURI().substring(0, pReq.getContextPath().length());
 }
Beispiel #22
0
  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=ISO-8859-1");
      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');
      out.write('\n');

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write('\r');
      out.write('\n');
      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 HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("\t<head>\r\n");
      out.write("\t\t<base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("\r\n");
      out.write("\t\t<title>My JSP 'hello.jsp' starting page</title>\r\n");
      out.write("\r\n");
      out.write("\t\t<meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("\t\t<meta http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("\t\t<meta http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("\t\t<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("\t\t<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("\t\t<!--\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\">\r\n");
      out.write("\t-->\r\n");
      out.write("\r\n");
      out.write("\t</head>\r\n");
      out.write("\r\n");
      out.write("\t<body>\r\n");
      out.write("\t\t");
      if (_jspx_meth_c_out_0(_jspx_page_context)) return;
      out.write("\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);
    }
  }
Beispiel #23
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    Throwable exception = (Throwable) request.getAttribute("javax.servlet.jsp.jspException");
    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=GBK");
      pageContext =
          _jspxFactory.getPageContext(this, request, response, "/error.jsp", true, 8192, true);

      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();

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

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

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

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(5,0);to=(5,49)]
      /* ----  power:checkpower ---- */
      com.kingsoft.gmsystem.web.taglib.PowerTag _jspx_th_power_checkpower_0 =
          new com.kingsoft.gmsystem.web.taglib.PowerTag();
      _jspx_th_power_checkpower_0.setPageContext(pageContext);
      _jspx_th_power_checkpower_0.setParent(null);
      _jspx_th_power_checkpower_0.setModulecode("accountroleinfo");
      try {
        int _jspx_eval_power_checkpower_0 = _jspx_th_power_checkpower_0.doStartTag();
        if (_jspx_eval_power_checkpower_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
          throw new JspTagException(
              "Since tag handler class com.kingsoft.gmsystem.web.taglib.PowerTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
        if (_jspx_eval_power_checkpower_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            // end
            // begin [file="/search/accountroleinfo.jsp";from=(5,0);to=(5,49)]
          } while (_jspx_th_power_checkpower_0.doAfterBody()
              == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
        }
        if (_jspx_th_power_checkpower_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
          return;
      } finally {
        _jspx_th_power_checkpower_0.release();
      }
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(5,49);to=(6,0)]
      out.write("\r\n");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(6,2);to=(19,0)]

      String account =
          new String(Util.setNullToEmpty(request.getParameter("account")).getBytes("ISO-8859-1"));
      String roleName =
          new String(Util.setNullToEmpty(request.getParameter("roleName")).getBytes("ISO-8859-1"));
      String zonecode = request.getParameter("zonecode2");
      String game_code = request.getParameter("game_code");
      String gatewayName = request.getParameter("gatewayName");

      GMHelper gh = new GMHelper();
      List gatewayList = gh.getGatewayList();
      Iterator it = gatewayList.iterator();
      Iterator accountRoleIterator = null;
      if (null != request.getAttribute("accountRoleList"))
        accountRoleIterator = ((ArrayList) request.getAttribute("accountRoleList")).iterator();
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(19,2);to=(27,14)]
      out.write(
          "\r\n<html>\r\n\t<!-- InstanceBegin template=\"/Templates/normal.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\r\n\t<head>\r\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\">\r\n\t\t<!-- InstanceBeginEditable name=\"doctitle\" -->\r\n\t\t<title>玩家帐号角色互查</title>\r\n\t\t<!-- InstanceEndEditable -->\r\n\t\t<link href=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(27,17);to=(27,41)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(27,43);to=(29,8)]
      out.write(
          "/css/public.css\" rel=\"stylesheet\" type=\"text/css\">\r\n\t\t<script language=\"JavaScript\"\r\n\t\t\tsrc=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(29,11);to=(29,35)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(29,37);to=(31,16)]
      out.write(
          "/js/public.js\"></script>\r\n\t\t<script language=\"JavaScript\">\r\n\t\t\tvar AbsPath=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(31,19);to=(31,43)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(31,45);to=(34,2)]
      out.write(
          "\";   \r\n\t\t</script>\r\n\t\t<!-- InstanceBeginEditable name=\"head\" -->\r\n\t\t");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(34,4);to=(34,4)]
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(34,6);to=(36,15)]
      out.write("\r\n<script language=\"JavaScript\">\r\nvar game_code=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(36,18);to=(36,48)]
      out.print(Util.setNullToEmpty(game_code));
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(36,50);to=(37,14)]
      out.write("\";\r\nvar zonecode=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(37,17);to=(37,46)]
      out.print(Util.setNullToEmpty(zonecode));
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(37,48);to=(38,18)]
      out.write("\";\r\nvar gatewayNames=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(38,21);to=(38,53)]
      out.print(Util.setNullToEmpty(gatewayName));
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(38,55);to=(41,0)]
      out.write("\";\r\nvar gatewayAry = new Array();\r\n\r\n");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(41,2);to=(49,0)]

      HashMap hm = null;
      int cnt = 0;
      while (it.hasNext()) {
        hm = (HashMap) it.next();
        out.println(
            "gatewayAry["
                + cnt++
                + "] =new Array('"
                + hm.get("game_id")
                + "','"
                + hm.get("zonecode")
                + "','"
                + hm.get("gateway_name")
                + "','"
                + hm.get("area")
                + "','"
                + hm.get("group")
                + "','"
                + hm.get("region")
                + "'); ");
      }
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(49,2);to=(126,19)]
      out.write(
          "\r\n\r\nfunction checkValue()\r\n{\r\n\tvar strErr=\"\";\r\n\tif(IsEmpty(\"account\")&&IsEmpty(\"roleName\")) strErr+=\"*玩家帐号或角色信息不能同时为空\\n\";\r\n\tif(strErr!=\"\"){\r\n\t\talert(strErr);\t\r\n\t\treturn false;\r\n\t}else{\t\t\r\n\t\tvar objDiv = document.all(\"gateway\");\r\n\t\tvar aryCheck = objDiv.all.tags(\"INPUT\");\r\n\t\tvar intCheckLength = aryCheck.length;\r\n\t\tvar gateways = \"\";\r\n\t\tfor (i = 0; i < intCheckLength; i++) {\t\r\n\t\t\tif (aryCheck[i].checked) {\r\n\t\t\t\tgateways += aryCheck[i].name + \",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tdocument.all(\"gatewayName\").value = gateways;\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nfunction onChangeGameId()\r\n{\r\n\tvar objSel=document.all(\"zonecode2\");\r\n\tvar objSelTemp=document.all(\"zonecodeTemp\");\r\n\tvar objOption;\r\n\tobjSel.length=0;\r\n\tvar j=0;\r\n\tfor(i=0;i<objSelTemp.length;i++)\r\n\t{\r\n\t\tobjOption=objSelTemp.options[i];\r\n\t\tif(objOption.game_id==document.all(\"game_code\").value)\r\n\t\t{\r\n\t\t \tj+=1;\r\n\t\t \tif(j==1){\r\n\t\t\tobjSel.options[objSel.length]=new Option(0+\".所有区\",'all');\r\n\t\t\tobjSel.options[objSel.length-1].setAttribute(\"game_id\",objOption.game_id);\r\n\t\t \t}\r\n\t\t\tobjSel.options[objSel.length]=new Option(j+\".\"+objOption.text,objOption.value);\r\n\t\t\tobjSel.options[objSel.length-1].setAttribute(\"game_id\",objOption.game_id);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n</script>\r\n\t</head>\r\n\t<!-- InstanceEndEditable -->\r\n\r\n\t<body>\r\n\t\t<table width=\"100%\" height=\"100%\" border=\"0\" align=\"center\"\r\n\t\t\tcellspacing=\"0\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td height=\"20\" bgcolor=\"#BBDDFD\">\r\n\t\t\t\t\t&nbsp;&nbsp;当前位置:\r\n\t\t\t\t\t<!-- InstanceBeginEditable name=\"position\" -->\r\n\t\t\t\t\t<span class=\"title\">查询功能</span> &gt;&gt;\r\n\t\t\t\t\t<span class=\"title\">玩家帐号角色互查</span>\r\n\t\t\t\t\t<!-- InstanceEndEditable -->\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td align=\"center\" valign=\"top\">\r\n\t\t\t\t\t<!-- InstanceBeginEditable name=\"main\" -->\r\n\t\t\t\t\t<div id=\"divPrompt\"\r\n\t\t\t\t\t\tstyle=\"width: 250px; position: absolute; display: none; left: 340px; top: 300px; height: 44px;\">\r\n\t\t\t\t\t\t<table width=\"100%\" height=\"100%\" border=\"1\" align=\"center\"\r\n\t\t\t\t\t\t\tcellspacing=\"0\" bordercolor=\"#0000FF\" bgcolor=\"#FFFFFF\">\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"middle\">\r\n\t\t\t\t\t\t\t\t\t正在查询和等待返回结果,请稍候......\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<form action=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(126,22);to=(126,46)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(126,48);to=(139,8)]
      out.write(
          "/GMCServlet?action=accountroleinfo\" method=\"post\" onsubmit=\"return checkValue()\">\r\n\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td align=\"center\">\r\n\t\t\t\t\t\t\t\t所属游戏\r\n\t\t\t\t\t\t\t\t<select id=\"selectGamename\" name=\"game_code\"\r\n\t\t\t\t\t\t\t\t\tonmouseover=\"this.focus()\" onchange=\"onChangeGameId()\">\r\n\t\t\t\t\t\t\t\t\t<OPTION value='88'>\r\n\t\t\t\t\t\t\t\t\t\t剑网3\r\n\t\t\t\t\t\t\t\t\t</OPTION>\r\n\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t所在区\r\n\t\t\t\t\t\t\t\t<select name=\"zonecode2\"></select>\r\n\t\t\t\t\t\t\t\t");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(139,8);to=(140,58)]
      /* ----  display:display ---- */
      com.kingsoft.gmsystem.web.taglib.UserTag _jspx_th_display_display_0 =
          new com.kingsoft.gmsystem.web.taglib.UserTag();
      _jspx_th_display_display_0.setPageContext(pageContext);
      _jspx_th_display_display_0.setParent(null);
      _jspx_th_display_display_0.setDisplayCode("select_zone_all");
      _jspx_th_display_display_0.setProperty("zonecodeTemp");
      _jspx_th_display_display_0.setParameter("display:none");
      try {
        int _jspx_eval_display_display_0 = _jspx_th_display_display_0.doStartTag();
        if (_jspx_eval_display_display_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
          throw new JspTagException(
              "Since tag handler class com.kingsoft.gmsystem.web.taglib.UserTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
        if (_jspx_eval_display_display_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            // end
            // HTML // begin [file="/search/accountroleinfo.jsp";from=(140,58);to=(141,8)]
            out.write("\r\n\t\t\t\t\t\t\t\t");

            // end
            // begin [file="/search/accountroleinfo.jsp";from=(141,8);to=(141,26)]
          } while (_jspx_th_display_display_0.doAfterBody()
              == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
        }
        if (_jspx_th_display_display_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } finally {
        _jspx_th_display_display_0.release();
      }
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(141,26);to=(149,16)]
      out.write(
          "\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"gatewayName\"/>\r\n\t\t\t\t\t\t\t\t所在服\r\n\t\t\t\t\t\t\t\t<div id=\"gateway\">\r\n\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t玩家帐号\r\n\t\t\t\t\t\t\t\t<input name=\"account\" type=\"text\" class=\"text\"\r\n\t\t\t\t\t\t\t\t\tvalue=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(149,19);to=(149,26)]
      out.print(account);
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(149,28);to=(152,63)]
      out.write(
          "\" onmouseover=\"this.focus()\" size=\"20\"\r\n\t\t\t\t\t\t\t\t\tmaxlength=\"30\">\r\n\t\t\t\t\t\t\t\t玩家角色\r\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"roleName\" class=\"text\" value=\"");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(152,66);to=(152,74)]
      out.print(roleName);
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(152,76);to=(154,45)]
      out.write(
          "\"\r\n\t\t\t\t\t\t\t\t\tonmouseover=\"this.focus()\" size=\"20\" maxlength=\"30\">\r\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"isLike\" ");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(154,48);to=(154,128)]
      out.print(Util.setNullToEmpty(request.getParameter("isLike")).equals("") ? "" : "checked");
      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(154,130);to=(183,9)]
      out.write(
          ">模糊查询\r\n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btnSearch\" value=\"查询\"/>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td align=\"center\">\r\n\t\t\t\t\t\t\t\t<br>\r\n\t\t\t\t\t\t\t\t<table width=\"773\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\"\r\n\t\t\t\t\t\t\t\t\tclass=\"tablelist\">\r\n\t\t\t\t\t\t\t\t\t<tr align=\"left\" bgcolor=\"#419ADC\">\r\n\t\t\t\t\t\t\t\t\t\t<td height=\"31\" colspan=\"6\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t<font color=#ffffff><b>&nbsp;&#8226;&nbsp;玩家帐号基本信息</b>\r\n\t\t\t\t\t\t\t\t\t\t\t</font>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t玩家帐号\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t玩家角色\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t所在区\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t所在服\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t");

      // end
      // begin [file="/search/accountroleinfo.jsp";from=(183,11);to=(187,9)]

      if (null != accountRoleIterator) {
        while (accountRoleIterator.hasNext()) {
          hm = (HashMap) accountRoleIterator.next();

          // end
          // HTML // begin [file="/search/accountroleinfo.jsp";from=(187,11);to=(191,11)]
          out.write(
              "\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t");

          // end
          // begin [file="/search/accountroleinfo.jsp";from=(191,14);to=(191,32)]
          out.print(hm.get("account"));
          // end
          // HTML // begin [file="/search/accountroleinfo.jsp";from=(191,34);to=(194,11)]
          out.write(
              "\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t");

          // end
          // begin [file="/search/accountroleinfo.jsp";from=(194,14);to=(194,33)]
          out.print(hm.get("RoleName"));
          // end
          // HTML // begin [file="/search/accountroleinfo.jsp";from=(194,35);to=(197,11)]
          out.write(
              "\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t");

          // end
          // begin [file="/search/accountroleinfo.jsp";from=(197,14);to=(197,33)]
          out.print(hm.get("ZoneName"));
          // end
          // HTML // begin [file="/search/accountroleinfo.jsp";from=(197,35);to=(200,11)]
          out.write(
              "\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" height=\"25\" align=\"right\" nowrap>\r\n\t\t\t\t\t\t\t\t\t\t\t");

          // end
          // begin [file="/search/accountroleinfo.jsp";from=(200,14);to=(200,36)]
          out.print(hm.get("GatewayName"));
          // end
          // HTML // begin [file="/search/accountroleinfo.jsp";from=(200,38);to=(203,9)]
          out.write(
              "\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t");

          // end
          // begin [file="/search/accountroleinfo.jsp";from=(203,11);to=(206,9)]

        }
      }

      // end
      // HTML // begin [file="/search/accountroleinfo.jsp";from=(206,11);to=(260,0)]
      out.write(
          "\r\n\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t\t</form>\r\n\t\t\t\t\t<script language=\"JavaScript\">\r\ndocument.getElementById(\"zonecode2\").onchange = function onChangeZoneCode(){\r\n\tvar objSel = document.getElementById(\"zonecode2\");\r\n\tvar objOpt = objSel.options[objSel.selectedIndex];\r\n\tvar tmp = \"\";\r\n\tfor(var cnt=0;cnt<gatewayAry.length;cnt++){\r\n\t\tif(gatewayAry[cnt][0]==objOpt.game_id&&gatewayAry[cnt][1]==objOpt.value){\t\r\n\t\t\ttmp +=\" <input type='checkbox' name='\"+gatewayAry[cnt][5]+\"'>\"+gatewayAry[cnt][2];\r\n\t\t}\r\n\t}\r\n\tdocument.getElementById(\"gateway\").innerHTML = tmp;\r\n}\r\n\r\n\t  if(game_code!=\"\"){\r\n\t\tSetSelValue(\"game_code\",game_code);\r\n        onChangeGameId();\r\n        SetSelValue(\"zonecode2\",zonecode);\r\n\t  }else{\r\n          onChangeGameId();\r\n       }\r\n      if(zonecode!=\"\"){\r\n\t\tonChangeZoneCode();\r\n\t\tif(gatewayNames!=\"\"){\r\n\t\t\tvar objDiv = document.all(\"gateway\");\r\n\t\t\tvar aryCheck = objDiv.all.tags(\"INPUT\");\r\n\t\t\tvar intCheckLength = aryCheck.length;\r\n\t\t\tvar gateways = \"\";\r\n\t\t\tfor (i = 0; i < intCheckLength; i++) {\t\r\n\t\t\t\tif (gatewayNames.indexOf(aryCheck[i].name+\",\")>-1) {\r\n\t\t\t\t\taryCheck[i].checked=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n   \t  }\r\n\t</script>\r\n\t\t\t\t\t<!-- InstanceEndEditable -->\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td height=\"16\" align=\"center\" bgcolor=\"#BBDDFD\">\r\n\t\t\t\t\tCopyright &copy; 2005 Kingsoft Corp,All Rights Reserved\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t</body>\r\n\t<!-- InstanceEnd -->\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);
    }
  }