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

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/xml;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      HttpSession user = request.getSession(true);
      Notification newNotice = (Notification) user.getAttribute("newNotice");
      List exclude = new ArrayList();
      exclude.add(NotificationWizardServlet.WT_VENDOR_NAME); // Exclude WebTelemetry

      out.print(buildTree(newNotice, exclude));
      out.write("\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      response.setContentType("text/xml");

      int mapId = -1;

      TopologyMap map = (TopologyMap) request.getAttribute("map");

      String isRcad = "false";

      if (map == null) {
        String strMapId = request.getParameter("mapId");
        if (strMapId != null) {
          mapId = Integer.parseInt(request.getParameter("mapId"));
        }
      }
      if (map == null && mapId != 99999) {
        map = TopologyMap.getMapById(mapId);
      }
      if (map != null) {
        List centities = map.getCentityMaps();
        List connections = map.getConnections();
        List bgimages = map.getMapBgimages();

        if (WTAccountCredentials.current() == null) {
          System.out.println("NullPointerException: WTAccountCredentials.current() is null");
          return;
        }

        String user = WTAccountCredentials.current().getUserName();
        boolean admin = false;
        WTRole role = WTAccountCredentials.current().getMostPrivilegedRole();
        admin = role.isOrgAdmin() || role.isSiteAdmin();

        if (user == null) {

          out.write("<topology-map />");

          return;
        }
        boolean readOnly = !user.equals(map.getCreator());

        Integer groupId = map.getGroupId();
        String groupAttrs = "";
        if (groupId != null) {
          WTGroupManager groupMan = ManagersImpl.GroupManager;
          WTGroup group = (WTGroup) groupMan.getObject(groupId.intValue());
          groupMan.resolveReferences(group);
          groupAttrs =
              "groupName=\""
                  + URLEncoder.encode(group.getOrg().getName() + " - " + group.getName(), "UTF-8")
                  + "\" groupId=\""
                  + groupId.intValue()
                  + "\"";
        }

        isRcad = String.valueOf(map.isRca());

        out.write("\n\t");
        out.write("<topology-map mapId=\"");
        out.print(map.getMapId());
        out.write("\" name=\"");
        out.print(map.getName());
        out.write("\" mapTypeId=\"");
        out.print(map.getTypeId());
        out.write("\" \n\t zoomLevel=\"");
        out.print(map.getZoom());
        out.write("\" paneScrollX=\"");
        out.print(map.getScrollX());
        out.write("\" paneScrollY=\"");
        out.print(map.getScrollY());
        out.write("\"\n\t shared=\"");
        out.print(map.isShared());
        out.write("\" creator=\"");
        out.print(map.getCreator());
        out.write("\" iconSize=\"");
        out.print(map.getIconSize());
        out.write("\"\n\t labelsAlwaysOn=\"");
        out.print(map.isLabelsAlwaysOn());
        out.write("\" readOnly=\"");
        out.print(readOnly);
        out.write("\" ");
        out.print(groupAttrs);
        out.write(" admin=\"");
        out.print(admin);
        out.write("\" isRcad=\"");
        out.print(isRcad);
        out.write("\">\n\t\n\t\t");
        out.write("<entities>\n\t");

        for (Iterator it = centities.iterator(); it.hasNext(); ) {
          CentityMap centityMap = (CentityMap) it.next();
          StringBuffer hierarchyBuffer = new StringBuffer();
          if (centityMap.getType().equals("category")) {
            WTCategory cat =
                (WTCategory)
                    ManagersImpl.CategoryManager.getObject(
                        Integer.valueOf(centityMap.getIdForType()));
            List sectionList = ManagersImpl.CategoryManager.getAllParentSections(cat);

            for (Iterator sectionIt = sectionList.iterator(); sectionIt.hasNext(); ) {
              WTSection section = (WTSection) sectionIt.next();
              hierarchyBuffer.append(section.getName() + " / ");
            }
          }

          out.write("\n\t    ");
          out.write("<entity centityId=\"");
          out.print(centityMap.getCentityId());
          out.write("\" type=\"");
          out.print(centityMap.getType());
          out.write("\" id=\"");
          out.print(centityMap.getXmlId());
          out.write("\"\n\t     icon=\"");
          out.print(centityMap.getIcon());
          out.write("\" label=\"");
          out.print(centityMap.getLabel());
          out.write("\" hierarchy=\"");
          out.print(hierarchyBuffer.toString());
          out.write("\"\n\t      x=\"");
          out.print(centityMap.getXPlacement());
          out.write("\" y=\"");
          out.print(centityMap.getYPlacement());
          out.write("\"/>\n\t    ");
        }

        out.write("\n\t\t");
        out.write("</entities>\n\t\t");
        out.write("<connections>\n\t");

        for (Iterator it = connections.iterator(); it.hasNext(); ) {
          CentityConnection cc = (CentityConnection) it.next();
          String startType = null;
          String endType = null;
          int startId = -1;
          int endId = -1;
          if (cc.getParentNodeid() != null) {
            startType = "node";
            startId = cc.getParentNodeid();
          } else if (cc.getParentCategoryId() != null) {
            startType = "category";
            startId = cc.getParentCategoryId();
          }
          if (cc.getNodeid() != null) {
            endType = "node";
            endId = cc.getNodeid();
          } else if (cc.getCategoryId() != null) {
            endType = "category";
            endId = cc.getCategoryId();
          }

          out.write("\n\t\t\t");
          out.write("<connection startType=\"");
          out.print(startType);
          out.write("\" startId=\"");
          out.print(startId);
          out.write("\" endType=\"");
          out.print(endType);
          out.write("\" endId=\"");
          out.print(endId);
          out.write("\" />\n\t");
        }

        out.write("\n\t\t");
        out.write("</connections>\n\t\t");
        out.write("<bgimages>\n\t");

        for (Iterator it = bgimages.iterator(); it.hasNext(); ) {
          MapBgimage bgimage = (MapBgimage) it.next();

          out.write("\n\t\t\t\t");
          out.write("<bgimage mapBgimageId=\"");
          out.print(bgimage.getMapBgimageId());
          out.write("\" bgimageId=\"");
          out.print(bgimage.getBgimageId());
          out.write("\"\n\t\t\t\t creator=\"");
          out.print(bgimage.getCreator());
          out.write("\" src=\"");
          out.print(bgimage.getSrc());
          out.write("\" x=\"");
          out.print(bgimage.getXPlacement());
          out.write("\"\n\t\t\t\t  y=\"");
          out.print(bgimage.getYPlacement());
          out.write("\" zindex=\"");
          out.print(bgimage.getZIndex());
          out.write("\" xscale=\"");
          out.print(bgimage.getXScale());
          out.write("\"\n\t\t\t\t   yscale=\"");
          out.print(bgimage.getYScale());
          out.write("\" />\n\t");
        }

        out.write("\n\t\t");
        out.write("</bgimages>\n\t\t\n\t");
        out.write("</topology-map>\n");

      } else {
        out.write("\n");
        out.write(
            "<topology-map mapId=\"99999\" name=\"Topology Sample\" zoomLevel=\"10\" paneScrollX=\"0\" paneScrollY=\"0\" shared=\"true\" creator=\"admin\" iconSize=\"32\" labelsAlwaysOn=\"true\" type=\"topology\">\n\t");
        out.write("<entities>\n\t\t");
        out.write(
            "<entity centityId=\"-90\" type=\"node\" id=\"node_603\" icon=\"OS_Win2003.swf\" label=\"CARROT\" x=\"300\" y=\"200\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-91\" type=\"node\" id=\"node_653\" icon=\"OS_Win2000.swf\" label=\"RAISIN\" x=\"200\" y=\"200\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-92\" type=\"node\" id=\"node_615\" icon=\"OS_Win2003.swf\" label=\"10.100.100.88\" x=\"300\" y=\"100\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-93\" type=\"node\" id=\"node_616\" icon=\"OS_WinXP.swf\" label=\"10.100.100.241\" x=\"100\" y=\"100\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-94\" type=\"node\" id=\"node_613\" icon=\"OS_FoundryIronWare.swf\" label=\"Foundry\" x=\"200\" y=\"125\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-95\" type=\"node\" id=\"node_656\" icon=\"OS_WinXP.swf\" label=\"10.100.100.239\" x=\"225\" y=\"70\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-96\" type=\"node\" id=\"node_610\" icon=\"OS_CiscoIOS.swf\" label=\"Cittio-2621\" x=\"125\" y=\"150\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-97\" type=\"node\" id=\"node_614\" icon=\"OS_Linux.swf\" label=\"Mango\" x=\"100\" y=\"200\"/>\n\n\t");
        out.write("</entities>\n\t");
        out.write("<connections>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"603\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"653\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"615\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"616\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"656\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"610\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"614\" endType=\"node\" endId=\"610\"/>\n\t");
        out.write("</connections>\n\t");
        out.write("<bgimages />\n");
        out.write("</topology-map>\n");
      }

      out.write("\n\n\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      // Get required parameter(s)
      String nodeIdStr = request.getParameter("node");
      if (nodeIdStr == null) throw new org.opennms.web.MissingParameterException("node");
      int nodeId = Integer.parseInt(nodeIdStr);
      String nodeLabel = org.opennms.web.element.NetworkElementFactory.getNodeLabel(nodeId);
      Node node_db = NetworkElementFactory.getNode(nodeId);
      String orgName = node_db.getOrganizationName();
      Asset asset = this.model.getAsset(nodeId);
      boolean isNew = false;

      if (asset == null) {
        asset = new Asset();
        isNew = true;
      }

      Vector vCategories = WTProperties.getList("AssetCategories.list");

      out.write("\n\n");
      out.write("<html>\n");
      out.write("<head>\n\t");
      out.write("<title>WebTelemetry - Node Assets | System Info for ");
      out.print(node_db.getLabel());
      out.write("</title>\n\t");
      out.write("<base HREF=\"");
      out.print(org.opennms.web.Util.calculateUrlBase(request));
      out.write("\" />\n\t");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n\t");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\n");
      out.write("</head>\n\n");
      out.write("<body>\n\t");
      out.write("<!-- Header -->\n\t");
      String title = "Asset - Vendor Info for Node: " + node_db.getLabel() + " (" + orgName + ")";
      out.write("\n\t");
      JspRuntimeLibrary.include(
          request,
          response,
          "/includes/tabheader.jsp"
              + "?"
              + "title="
              + java.net.URLEncoder.encode("" + title)
              + "&"
              + "refresh="
              + "1"
              + "&"
              + "helpURL="
              + "assetmanager%2FWTHelp_AssetManager.html"
              + "&"
              + "tabgroup="
              + "asset"
              + "&"
              + "tabselected="
              + "vendor"
              + "&"
              + "node="
              + java.net.URLEncoder.encode("" + nodeIdStr),
          out,
          false);
      out.write("\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n");
      out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t");
      out.write("<tr>\n\t\t");
      out.write("<td width=\"10\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n\t\t");
      out.write("<td>\n\n");
      out.write("<!-- USER-DEFINED ATTRIBUTES TABLE: was Identification -->\n      ");
      out.write("<form action=\"asset/modifyAsset\" method=\"POST\" name=\"sysInfo\">\n        ");
      out.write("<input type=\"hidden\" name=\"node\" value=\"");
      out.print(nodeId);
      out.write("\" />\n        ");
      out.write("<input type=\"hidden\" name=\"isnew\" value=\"");
      out.print(isNew);
      out.write("\" />\n        ");
      out.write("<input type=\"hidden\" name=\"view\" value=\"asset-tab-vendor\" />\n\n        ");
      if (!isNew) {
        out.write("\n        ");
        out.write("<!-- asset-tab-system -->\n        ");
        out.write("<input type=\"hidden\" name=\"category\" value=\"");
        out.print(asset.getCategory());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"serialnumber\" value=\"");
        out.print(asset.getSerialNumber());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"manufacturer\" value=\"");
        out.print(asset.getManufacturer());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"operatingsystem\" value=\"");
        out.print(asset.getOperatingSystem());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"modelnumber\" value=\"");
        out.print(asset.getModelNumber());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"assetnumber\" value=\"");
        out.print(asset.getAssetNumber());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"dateinstalled\" value=\"");
        out.print(asset.getDateInstalled());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"description\" value=\"");
        out.print(asset.getDescription());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"comments\" value=\"");
        out.print(asset.getComments());
        out.write("\" />\n\n        ");
        out.write("<!-- asset-tab-location -->\n        ");
        out.write("<input type=\"hidden\" name=\"region\" value=\"");
        out.print(asset.getRegion());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"division\" value=\"");
        out.print(asset.getDivision());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"department\" value=\"");
        out.print(asset.getDepartment());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"address1\" value=\"");
        out.print(asset.getAddress1());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"address2\" value=\"");
        out.print(asset.getAddress2());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"city\" value=\"");
        out.print(asset.getCity());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"state\" value=\"");
        out.print(asset.getState());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"zip\" value=\"");
        out.print(asset.getZip());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"building\" value=\"");
        out.print(asset.getBuilding());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"floor\" value=\"");
        out.print(asset.getFloor());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"room\" value=\"");
        out.print(asset.getRoom());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"rack\" value=\"");
        out.print(asset.getRack());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"slot\" value=\"");
        out.print(asset.getSlot());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"port\" value=\"");
        out.print(asset.getPort());
        out.write("\" />\n        ");
        out.write("<input type=\"hidden\" name=\"circuitid\" value=\"");
        out.print(asset.getCircuitId());
        out.write("\" />\n        ");
      }
      out.write("\n\n");
      out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\t");
      out.write("<table width=\"98%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t  ");
      out.write("<tr class=\"tableHeader\">\n\t    ");
      out.write("<td colspan=\"6\" class=\"tableHeader\">Vendor");
      out.write("</td>\n\t  ");
      out.write("</tr>\n\t  ");
      out.write("<tr class=\"tableRowLight\">\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Name:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"vendor\" value=\"");
      out.print(asset.getVendor());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Phone:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"vendorphone\" value=\"");
      out.print(asset.getVendorPhone());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Fax:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"vendorfax\"  value=\"");
      out.print(asset.getVendorFax());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t  ");
      out.write("</tr>\n\t  ");
      out.write("<tr class=\"tableRowLight\">\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Lease:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"lease\" value=\"");
      out.print(asset.getLease());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Lease Expires:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"leaseexpires\" value=\"");
      out.print(asset.getLeaseExpires());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Vendor Asset:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"vendorassetnumber\" value=\"");
      out.print(asset.getVendorAssetNumber());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t  ");
      out.write("</tr>\n\t  ");
      out.write("<tr class=\"tableRowLight\">\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Maint Contract:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"maintcontract\" value=\"");
      out.print(asset.getMaintContract());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Contract Expires:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"maintcontractexpires\" value=\"");
      out.print(asset.getMaintContractExpires());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<span class=\"formText\">Maint Phone:");
      out.write("</span>");
      out.write("</td>\n\t    ");
      out.write("<td class=\"tableText\">");
      out.write("<input type=\"text\" name=\"supportphone\" value=\"");
      out.print(asset.getSupportPhone());
      out.write("\" size=\"20\" maxlength=\"64\"/>");
      out.write("</td>\n\t  ");
      out.write("</tr>\n\t  ");
      out.write("<tr class=\"tableRowLight\">\n\t    ");
      out.write("<td class=\"tableText\" colspan=\"6\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n\t  ");
      out.write("</tr>\n\t");
      out.write("</table>");
      out.write("<br />\n\n\t");
      out.write("<table width=\"98%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n\t  ");
      out.write("<tr>\n\t\t");
      out.write("<td colspan=\"3\">");
      out.write("<br />\n\t\t\t");
      out.write("<INPUT type=\"hidden\" name=\"button\" value=\"\">\n\t\t\t");
      out.write(
          "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_save_changes.gif\" onClick=\"document.sysInfo.button.value='Save Changes';\">\n\t\t\t&nbsp;&nbsp;&nbsp;\n\t\t\t");
      out.write(
          "<a href=\"javascript:document.sysInfo.reset()\" onClick=\"javascript:document.sysInfo.reset();\">");
      out.write("<img src=\"/wt-portal/images/buttons/btn_reset.gif\" border=\"0\" alt=\"Reset\">");
      out.write("</a>");
      out.write("<br />&nbsp;\n\t\t\t");
      out.write("<!-- ");
      out.write("<input type=\"submit\" value=\"Save Changes\"/>\n\t\t\t");
      out.write("<input type=\"reset\" /> -->\n\t\t");
      out.write("</td>\n\t\t");
      out.write("<td colspan=\"3\" align=\"right\" class=\"message\">");
      out.write("<br />\n\t\t\t");
      if (isNew) {
        out.write("\n\t\t\t\tNew Record\n\t\t\t");
      } else {
        out.write("\n\t\t\t\tLast Modified: ");
        out.print(WTTools.formatLocalDateToString(asset.getLastModifiedDate()));
        out.write(" by ");
        out.print(asset.getUserLastModified());
        out.write("\n\t\t\t");
      }
      out.write("\n\t\t");
      out.write("</td>\n\t  ");
      out.write("</tr>\n\t");
      out.write("</table>\n\t");
      out.write("</form>\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t");
      out.write("</td>\n\t");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<!-- END FRAMING TABLE:close tags-->\n\n");
      out.write("<br>\n");
      JspRuntimeLibrary.include(request, response, "/includes/footer.jsp", out, false);
      out.write("\n\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      User user = null;
      UserFactory userFactory = UserFactory.getInstance();
      String userID = request.getParameter("userID");
      try {
        UserFactory.init();
        user = userFactory.getUser(userID);
      } catch (Exception e) {
        throw new ServletException("Could not find user " + userID + " in user factory.", e);
      }

      out.write("\n");
      out.write("<html>\n");
      out.write("<head>\n    ");
      out.write("<title>WebTelemetry -  | User Management | User Detail");
      out.write("</title>\n    ");
      out.write("<base HREF=\"");
      out.print(org.opennms.web.Util.calculateUrlBase(request));
      out.write("\" />\n    ");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n\t");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\n");
      out.write("</head>\n");
      out.write("<body>\n");
      String title = " User Management  - Detail Summary for: " + userID;
      out.write("\n");
      /* ----  c:if ---- */
      org.apache.taglibs.standard.tag.el.core.IfTag _jspx_th_c_if_0 =
          (org.apache.taglibs.standard.tag.el.core.IfTag)
              _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.el.core.IfTag.class);
      _jspx_th_c_if_0.setPageContext(pageContext);
      _jspx_th_c_if_0.setParent(null);
      _jspx_th_c_if_0.setTest("${not param.orgAdminPopup}");
      int _jspx_eval_c_if_0 = _jspx_th_c_if_0.doStartTag();
      if (_jspx_eval_c_if_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\n    ");
          JspRuntimeLibrary.include(
              request,
              response,
              "/includes/header.jsp"
                  + "?"
                  + "title="
                  + java.net.URLEncoder.encode("" + title)
                  + "&"
                  + "help="
                  + "monitoringadmin%2Fusers%2FWTHelp_User.html",
              out,
              false);
          out.write("\n");
          int evalDoAfterBody = _jspx_th_c_if_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
      }
      if (_jspx_th_c_if_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      _jspx_tagPool_c_if_test.reuse(_jspx_th_c_if_0);
      out.write("\n");
      if (_jspx_meth_c_if_1(pageContext)) return;
      out.write("\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n");
      out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t");
      out.write("<tr>\n\t\t");
      out.write("<td width=\"10\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n\t\t");
      out.write("<td>\n");
      out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n");
      out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n    ");
      out.write("<tr class=\"tableHeader\">\n        ");
      out.write("<td class=\"tableHeader\" colspan=\"2\">User Information");
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\" width=\"25%\">");
      out.write("<b>Full Name:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\" width=\"75%\">");
      out.print(user.getFullName());
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowDark\">\n        ");
      out.write("<td class=\"tableText\">");
      out.write("<b>Comments:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\">");
      out.print(user.getUserComments());
      out.write("</td>\n     ");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<br>\n");
      out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n    ");
      out.write("<tr class=\"tableHeader\">\n        ");
      out.write("<td class=\"tableHeader\" colspan=\"2\">Notification Information");
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\" width=\"25%\">");
      out.write("<b>Email:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\" width=\"75%\">");
      out.print(userFactory.getEmail(userID));
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowDark\">\n        ");
      out.write("<td class=\"tableText\">");
      out.write("<b>Pager Email:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\">");
      out.print(userFactory.getPagerEmail(userID));
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\">");
      out.write("<b>Numerical Service:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\">");
      out.print(userFactory.getNumericPage(userID));
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowDark\">\n        ");
      out.write("<td class=\"tableText\">");
      out.write("<b>Numerical Pin:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\">");
      out.print(userFactory.getNumericPin(userID));
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\">");
      out.write("<b>Text Service:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\">");
      out.print(userFactory.getTextPage(userID));
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowDark\">\n        ");
      out.write("<td class=\"tableText\">");
      out.write("<b>Text Pin:");
      out.write("</b>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableText\">");
      out.print(userFactory.getTextPin(userID));
      out.write("</td>\n     ");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<br>\n");
      out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n    ");
      out.write("<tr class=\"tableHeader\">\n        ");
      out.write("<td class=\"tableHeader\" colspan=\"2\">Duty Schedules");
      out.write("</td>\n     ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\" colspan=\"2\">");
      out.write("<br />\n        ");
      out.write("<!-- weekly schedule -->\n                ");
      out.write(
          "<table width=\"50%\" border=\"1\" bordercolor=\"#999999\" cellspacing=\"0\" cellpadding=\"2\" >\n\t\t\t");
      Collection dutySchedules = user.getDutyScheduleCollection();
      out.write("\n                        ");

      int i = 0;
      Iterator iter = dutySchedules.iterator();
      while (iter.hasNext()) {
        DutySchedule tmp = new DutySchedule((String) iter.next());
        Vector curSched = tmp.getAsVector();
        i++;

        out.write("\n                        ");
        out.write("<tr>\n                           ");
        ChoiceFormat days = new ChoiceFormat("0#Mo|1#Tu|2#We|3#Th|4#Fr|5#Sa|6#Su");
        for (int j = 0; j < 7; j++) {
          Boolean curDay = (Boolean) curSched.get(j);

          out.write("\n                          ");
          out.write("<td width=\"5%\">\n                           ");
          out.print((curDay.booleanValue() ? days.format(j) : "X"));
          out.write("\n                          ");
          out.write("</td>\n                          ");
        }
        out.write("\n                          ");
        out.write("<td width=\"5%\">\n                            ");
        out.print(curSched.get(7));
        out.write("\n                          ");
        out.write("</td>\n                          ");
        out.write("<td width=\"5%\">\n                            ");
        out.print(curSched.get(8));
        out.write("\n                          ");
        out.write("</td>\n                        ");
        out.write("</tr>\n                        ");
      }
      out.write("\n                      ");
      out.write("</table>\n        ");
      out.write("<!-- end weekly schedule -->   \n        ");
      out.write("</td>\n    ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\" colspan=\"2\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n    ");
      out.write("</tr> \n");
      out.write("</table>\n");
      out.write("<br>");
      out.write("<br>\n");
      out.write("<b>Member of the Following Organizations &amp; Groups:");
      out.write("</b>\n");
      out.write("<!-- BEGIN: NEW ASSIGNED GROUPS TABLE -->\n");
      out.write("<table width=\"98%\"border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\n    ");

      // Get the user's orgs
      WTOrganizationDAO orgDAO = DAOImpl.OrgDAO;
      WTOrganization[] orgs = orgDAO.getWTOrganization();

      if (orgs != null) {
        // Loop thru orgs
        for (int idx = 0; idx < orgs.length; idx++) {

          out.write("\n\n    ");
          out.write("<tr class=\"tableHeader\">\n        ");
          out.write("<td class=\"tableHeader\" colspan=\"2\">Organization Name: ");
          out.print(orgs[idx].getName());
          out.write("</td>\n\t");
          out.write("</tr>\n    ");
          out.write("<tr class=\"tableRowLight\">\n        ");
          out.write("<td class=\"tableText\" width=\"25%\">");
          out.write("<b>Assigned Groups:");
          out.write("</b>");
          out.write("</td>\n        ");
          out.write("<td class=\"tableText\" width=\"75%\">\n            ");

          // Get the orgs groups
          WTGroupManager grpMgr = ManagersImpl.GroupManager;
          int[] orgids = {orgs[idx].getID()};
          List groups = grpMgr.getUserGroups(user.getUserId(), orgids);

          if (groups != null) {
            // Loop thru the groups
            for (Iterator iterGrps = groups.iterator(); iterGrps.hasNext(); ) {
              WTGroup group = (WTGroup) iterGrps.next();
              WTRole role = (group.getRoles() == null ? null : (WTRole) group.getRoles().get(0));

              out.write("\n                    ");
              out.print(group.getName());
              out.write(" (");
              out.print((role == null ? "" : role.getName()));
              out.write(")");
              out.write("<br/>\n            ");
            }
          }

          out.write("\n\n        ");
          out.write("</td>\n\t");
          out.write("</tr>\n\n    ");
        }
      }

      out.write("\n\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\" colspan=\"2\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n    ");
      out.write("</tr> \n");
      out.write("</table>\n");
      out.write("<!-- END: NEW ASSIGNED GROUPS TABLE -->\n\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t");
      out.write("</td>\n\t");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<!-- END FRAMING TABLE:close tags-->\n");
      out.write("<br>\n\n");
      JspRuntimeLibrary.include(request, response, "/includes/footer.jsp", out, false);
      out.write("\n");
      out.write("</body>\n");
      out.write("</html>\n\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      String strIp = (String) request.getParameter("ip");
      String strCommunityString = (String) request.getParameter("cs");
      String strPort = (String) request.getParameter("port");
      String strTimeout = (String) request.getParameter("timeout");
      String strRetries = (String) request.getParameter("retries");
      String strNodeLabel = (String) request.getParameter("node");
      String strNodeId = request.getParameter("nodeId");
      String strFirstTime = (String) request.getParameter("firsttime");
      String strWindowId = (String) request.getParameter("windowid");

      // Create the querier and make the request.
      QueryFactory factory = new QueryFactory();
      Querier querier = (Querier) factory.createQuerier(WinPagePerfSnmpQuerier.QUERIER_NAME);
      DeviceCommunicator deviceCommunicator = new DeviceCommunicator();
      deviceCommunicator.sendQuery(querier, strIp);

      // Error processing
      if (querier.getErrorStatus() == -1) {
        RequestDispatcher rd =
            getServletContext()
                .getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpCommError");
        rd.forward(request, response);
        return;
      }
      if (querier.getErrorStatus() == -2) {
        RequestDispatcher rd =
            getServletContext()
                .getRequestDispatcher("/jsp/WTerror-handler.jsp?error=NoPerfmibSnmpError");
        rd.forward(request, response);
        return;
      }

      if (querier.getErrorStatus() != 0) {
        RequestDispatcher rd =
            getServletContext().getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpError");
        rd.forward(request, response);
        return;
      }

      Map calcs = querier.getCalculations();
      long[] results = (long[]) calcs.get(WinPagePerfSnmpQuerier.PAGE_RESULTS);

      if (results[0] < 0
          || results[1] < 0
          || results[2] < 0
          || results[3] < 0
          || results[4] < 0
          || results[5] < 0
          || results[6] < 0
          || results[7] < 0
          || results[8] < 0
          || results[9] < 0) {
        RequestDispatcher rd =
            getServletContext().getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpError");
        rd.forward(request, response);
        return;
      }

      Vector vPageStats = null;

      if (strFirstTime == null) {
        // Not the first time, so get the previous polled data from the session
        vPageStats = (Vector) session.getAttribute("vPageStats" + strWindowId);
      } else {
        // This is the first time in this JSP, so create the Vector which will contain the
        // polled data
        Random random = new Random();
        strWindowId = String.valueOf(random.nextInt());

        vPageStats = new Vector();
      }

      vPageStats.add(results);
      session.setAttribute("vPageStats" + strWindowId, vPageStats);

      // This random number is used to prevent the brower from caching the IMG tags
      Random random = new Random();
      int randomInt = random.nextInt();

      out.write("\r\n\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n  ");
      out.write("<title>WebTelemetry - Graphs | Real-Time | Windows Page Performance Monitoring");
      out.write("</title>\r\n  ");
      out.write("<META HTTP-EQUIV=\"refresh\" CONTENT=\"");
      out.print(WTProperties.getMonitorUIRefreshRate());
      out.write("; URL=");
      out.print(WTTools.getJspURL(request));
      out.write("WTwin-page-monitor.jsp?cs=");
      out.print(URLEncoder.encode(strCommunityString, "UTF-8"));
      out.write("&ip=");
      out.print(strIp);
      out.write("&port=");
      out.print(strPort);
      out.write("&timeout=");
      out.print(strTimeout);
      out.write("&retries=");
      out.print(strRetries);
      out.write("&node=");
      out.print(URLEncoder.encode(strNodeLabel, "UTF-8"));
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("&nodeId=");
      out.print(strNodeId);
      out.write("\">\r\n  ");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\r\n  ");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      String title =
          "Graphs - Real-Time - Windows Page Performance Monitoring for Node: " + strNodeLabel;
      out.write("\r\n");
      request.setAttribute("title", title);
      request.setAttribute("nodeJsp", "/wt-monitor/element/node.jsp?node=" + strNodeId);
      out.write("\r\n");
      /* ----  c:import ---- */
      org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 =
          (org.apache.taglibs.standard.tag.el.core.ImportTag)
              _jspx_tagPool_c_import_url_context.get(
                  org.apache.taglibs.standard.tag.el.core.ImportTag.class);
      _jspx_th_c_import_0.setPageContext(pageContext);
      _jspx_th_c_import_0.setParent(null);
      _jspx_th_c_import_0.setContext("/wt-monitor");
      _jspx_th_c_import_0.setUrl("/includes/header.jsp");
      int[] _jspx_push_body_count_c_import_0 = new int[] {0};
      try {
        int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag();
        if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
            javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
            _jspx_push_body_count_c_import_0[0]++;
            out = _bc;
            _jspx_th_c_import_0.setBodyContent(_bc);
            _jspx_th_c_import_0.doInitBody();
          }
          do {
            out.write("\r\n\t");
            if (_jspx_meth_c_param_0(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\r\n\t");
            if (_jspx_meth_c_param_1(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\r\n\t");
            if (_jspx_meth_c_param_2(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\r\n");
            int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody();
            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
          } while (true);
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
            out = pageContext.popBody();
          _jspx_push_body_count_c_import_0[0]--;
        }
        if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody();
        _jspx_th_c_import_0.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_import_0.doFinally();
        _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0);
      }
      out.write("\t\r\n\t");
      out.write("\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t");
      out.write("<tr>\r\n\t\t");
      out.write("<td align=\"right\">");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagefaultchart&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"20\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagefaultseries&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n\t");
      out.write("<tr>\r\n\t\t");
      out.write("<td align=\"right\">");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagenumchart&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t\t");
      out.write("<td>&nbsp;");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagenumseries&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n\t");
      out.write("<tr>\r\n\t\t");
      out.write("<td align=\"right\">");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagetimeschart&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t\t");
      out.write("<td>&nbsp;");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagetimesseries&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("</div>\r\n");
      out.write("<br>\r\n\r\n");
      /* ----  c:import ---- */
      org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_1 =
          (org.apache.taglibs.standard.tag.el.core.ImportTag)
              _jspx_tagPool_c_import_url_context_nobody.get(
                  org.apache.taglibs.standard.tag.el.core.ImportTag.class);
      _jspx_th_c_import_1.setPageContext(pageContext);
      _jspx_th_c_import_1.setParent(null);
      _jspx_th_c_import_1.setContext("/wt-monitor");
      _jspx_th_c_import_1.setUrl("/includes/footer.jsp");
      int[] _jspx_push_body_count_c_import_1 = new int[] {0};
      try {
        int _jspx_eval_c_import_1 = _jspx_th_c_import_1.doStartTag();
        if (_jspx_th_c_import_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_import_1[0]-- > 0) out = pageContext.popBody();
        _jspx_th_c_import_1.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_import_1.doFinally();
        _jspx_tagPool_c_import_url_context_nobody.reuse(_jspx_th_c_import_1);
      }
      out.write("\r\n\t\r\n");
      out.write("</body>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      // This JSP handles cross context communications from wt-monitor
      // to wt-core for use in accessing wt-core functionality that is
      // needed in WTnav-tree.jsp.

      // Assign a pooled DB connection handle
      Context ctx = new InitialContext();
      DataSource ds = (DataSource) ctx.lookup(WTConstants.WATCHTOWERDB_CONN);
      int iIndex = 6100;
      GraphViewManager graphman = new GraphViewManager(ds);
      // Vector views = graphman.getViews();

      Vector views = new Vector();
      WTOrganization[] orgs = null;

      WTAccountCredentials ac =
          (WTAccountCredentials)
              request.getSession().getAttribute(WTAccountCredentials.SESSION_ATTRIBUTE_AC);
      if (ac != null) {
        // WTOrganization[] orgs = null;
        int selectedOrg = ac.getCurrentManagedId();

        boolean siteUser = ac.getIsSiteUser();
        int userId = ac.getUserId();

        // Get list of organizations for the current user
        if (siteUser) {
          try {
            orgs = DAOImpl.OrgDAO.getWTOrganization();
          } catch (Exception e) {
            e.printStackTrace();
          }
        } else {
          if (!(userId < 0)) {
            try {
              orgs = DAOImpl.OrgDAO.getWTOrganizationsByUser(userId);
            } catch (Exception e) {
              e.printStackTrace();
            }
          }
        }

        // Get the list of actively managed nodes
        if (selectedOrg == WTAccountCredentials.ALL_ORGS) {
          if (siteUser) {
            views = graphman.getViews();
          } else {
            if (orgs != null) {
              int[] orgsIds = new int[orgs.length];
              for (int i = 0; i < orgs.length; i++) {
                orgsIds[i] = orgs[i].getID();
              }
              views = graphman.getViews(orgsIds);
            }
          }
        } else {
          views = graphman.getViews(selectedOrg);
        }
      }

      // My Graph Views is an experimental feature and is commented out until all kinks are worked
      // out. LS

      String strOutput = null;
      // 	if( views.size()==0 ) {
      //		strOutput = "nav.add(6100, 6000, 'My Graph Views', '/wt-monitor/report/index.jsp', 'My
      // Customized Graph Views', 'mainContentsFrame', icon16_basedir + 'bs_chart.gif',
      // icon16_basedir + 'bs_chart.gif', '');\r\n";
      //	} else {
      //		strOutput = "nav.add(6100, 6000, 'My Graph Views', '', 'My Customized Graph Views',
      // 'mainContentsFrame', icon16_basedir + 'bs_chart.gif', icon16_basedir + 'bs_chart.gif',
      // '');\r\n";
      //	}
      //	for (int i=0; i<views.size(); i++)
      //	{
      //		iIndex++;
      //		String strViewName = ((GraphViewJB)views.elementAt(i)).getName();
      //		int strOrgId = ((GraphViewJB)views.elementAt(i)).getOrgId();
      //		String orgName = null;
      //       for(int j=0;j<orgs.length;j++){
      //	        if(orgs[j].getID() != -1 && orgs[j].getID() == strOrgId){
      //	        	orgName = orgs[j].getName();
      //	        }
      //		}
      //
      //		strOutput +="nav.add(" + iIndex +
      //		            ", 6100, '" + strViewName +
      //		            "', 'javascript:
      // PopupCenteredWindow(\\'/wt-core/jsp/sysmon/graphview/GraphView.jsp?view=" + strViewName +
      // "&orgname="+orgName +"&start=01&end=02" + "\\', \\'graphview\\', \\'yes\\', \\'yes\\',
      // \\'yes\\', \\'900\\', \\'1010\\'); location.href=\\'/wt-monitor/wt-jsp/WTnav-tree.jsp\\';',
      // 'Open " + strViewName + " Graph View', '', icon16_basedir + 'bs_chart.gif', icon16_basedir
      // + 'bs_chart.gif', '');\r\n";
      // }

      out.write("\n\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n\n");
      out.print(strOutput);
      out.write("\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      PollerConfiguration pollconfig = getPollerConfiguration();
      org.opennms.netmgt.config.poller.Package pkg = null;

      int pkgIdx = -1;

      String pkgIdxStr = (String) request.getParameter("pkgidx");
      if (pkgIdxStr != null && pkgIdxStr.trim().length() > 0) {
        try {
          pkgIdx = Integer.parseInt(pkgIdxStr);
          if (pkgIdx >= 0) {
            if (pollconfig != null) {
              pkg = pollconfig.getPackage(pkgIdx);
            }
          }
        } catch (NumberFormatException ne) {
          ne.printStackTrace();
        }
      }

      if (pkg == null) {
        if ((org.opennms.netmgt.config.poller.Package) request.getSession().getAttribute("pkg")
            != null) {
          pkg = (org.opennms.netmgt.config.poller.Package) request.getSession().getAttribute("pkg");
        }
      }

      if (pkgIdx == -1) {
        pkgIdxStr = (String) request.getSession().getAttribute("pkgidx");
        if (pkgIdxStr != null && pkgIdxStr.trim().length() > 0) {
          try {
            pkgIdx = Integer.parseInt(pkgIdxStr);
          } catch (NumberFormatException ne) {
            ne.printStackTrace();
          }
        }
      }

      request.getSession().setAttribute("pkg", pkg);
      request.getSession().setAttribute("pkgidx", String.valueOf(pkgIdx));

      String title = " Poller Package Downtime Model";
      if (pkg != null) {
        title = " Poller Package - Downtime Model for: " + pkg.getName();
      }

      out.write("\n\n");
      out.write("<html>\n");
      out.write("<head>\n  ");
      out.write("<title>");
      out.print(title);
      out.write("</title>\n  ");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n  ");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\n\n");
      out.write(
          "<script language=javascript>\nfunction confirmDelete(msg)\n{\n\tvar agree=confirm(msg);\n\tif (agree)\n\t\treturn true;\n\telse\n\t\treturn false;\n}\n\nfunction addDowntime()\n{\n    var msg = \"\";\n    var error = false;\n    var begin = 0;\n    var end = 0;\n    var interval = 0;\n\n    dtbeginday = parseInt(document.downtime.dtbeginday.value) * 24 * 60 * 60 * 1000;\n    dtbeginhour = parseInt(document.downtime.dtbeginhour.value) * 60 * 60 * 1000;\n    dtbeginminute = parseInt(document.downtime.dtbeginminute.value) * 60 * 1000;\n    dtbeginsecond = parseInt(document.downtime.dtbeginsecond.value) * 1000;\n    dtbeginmillisecond = parseInt(document.downtime.dtbeginmillisecond.value);\n\n    dtendday = parseInt(document.downtime.dtendday.value) * 24 * 60 * 60 * 1000;\n    dtendhour = parseInt(document.downtime.dtendhour.value) * 60 * 60 * 1000;\n    dtendminute = parseInt(document.downtime.dtendminute.value) * 60 * 1000;\n    dtendsecond = parseInt(document.downtime.dtendsecond.value) * 1000;\n    dtendmillisecond = parseInt(document.downtime.dtendmillisecond.value);\n");
      out.write(
          "\n    dtintervalday = parseInt(document.downtime.dtintervalday.value) * 24 * 60 * 60 * 1000;\n    dtintervalhour = parseInt(document.downtime.dtintervalhour.value) * 60 * 60 * 1000;\n    dtintervalminute = parseInt(document.downtime.dtintervalminute.value) * 60 * 1000;\n    dtintervalsecond = parseInt(document.downtime.dtintervalsecond.value) * 1000;\n    dtintervalmillisecond = parseInt(document.downtime.dtintervalmillisecond.value);\n\n    document.downtime.dtbegin.value = dtbeginday + dtbeginhour + dtbeginminute + dtbeginsecond + dtbeginmillisecond;\n    document.downtime.dtend.value = dtendday + dtendhour + dtendminute + dtendsecond + dtendmillisecond;\n    document.downtime.dtinterval.value = dtintervalday + dtintervalhour + dtintervalminute + dtintervalsecond + dtintervalmillisecond;\n\n\tvar beginVal = trim(document.downtime.dtbegin.value);\n\tvar endVal = trim(document.downtime.dtend.value);\n\tvar intervalVal = trim(document.downtime.dtinterval.value);\n\n    if (beginVal == \"\") {\n        error = true;\n        msg += \"Must enter a numeric time value for \\\"begin\\\".\\n\";\n");
      out.write(
          "    }\n    if (endVal == \"\") {\n        error = true;\n        msg += \"\\nMust enter a numeric time value for \\\"end\\\".\\n\";\n    }\n    if (intervalVal  == \"\") {\n        error = true;\n        msg += \"\\nMust enter a numeric time value for \\\"interval\\\".\\n\";\n    }\n    if (isNaN(beginVal)) {\n        error = true;\n        msg += \"\\nMust enter a numeric time value for \\\"begin\\\".\\n\";\n    }\n    if (isNaN(endVal)) {\n        error = true;\n        msg += \"\\nMust enter a numeric time value for \\\"end\\\".\\n\";\n    }\n    if (isNaN(intervalVal)) {\n        error = true;\n        msg += \"\\nMust enter a numeric time value for \\\"interval\\\".\\n\";\n    }\n\n    if (!error) {\n        begin = parseInt(beginVal);\n        end = parseInt(endVal);\n        interval = parseInt(intervalVal);\n    \n        if (!(end > 0)) {\n            error = true;\n            msg = \"The end time must be greater than zero.\\n\";\n        }\n        if (!(interval > 0)) {\n            error = true;\n            msg += \"\\nThe 'interval' value must be greater than zero.\\n\";\n        }\n");
      out.write(
          "        if (!((end - begin) > 0)) {\n            error = true;\n            msg += \"\\nThe 'end' time must be greater than the 'begin'.\\n\";\n        }\n        if (!(interval ");
      out.write(
          "<= (end - begin))) {\n            error = true;\n            msg += \"\\nThe 'interval' time must be less than the difference of the 'begin' and the 'end'.\\n\";\n        }\n    }\n\n    if (error) {\n        alert (msg);\n        return;\n    }\n    else\n    {\n        document.downtime.target = \"pollerDetailFrame\";\n    \tdocument.downtime.action.value = 'adddt';\n    \tdocument.downtime.submit();\n    }\n}\n\nfunction removeDowntime(dtidx)\n{\n    if (confirmDelete('Are you sure you want to delete this downtime model?')) {\n        document.downtime.target = \"pollerDetailFrame\";\n        document.downtime.action.value = 'removedt';\n        document.downtime.dtidx.value = dtidx;\n    \tdocument.downtime.submit();\n    }\n}\n\nfunction updateDowntime()\n{\n    document.downtime.target = \"_parent\";\n    document.downtime.action.value = 'updatedt';\n\tdocument.downtime.submit();\n}\n\nfunction restoreDefaultDowntime()\n{\n    if (confirmDelete('Are you sure you want to restore the default downtime model? All your changes will be lost.')) {\n        document.downtime.target = \"pollerDetailFrame\";\n");
      out.write(
          "        document.downtime.action.value = 'restoredt';\n    \tdocument.downtime.submit();\n    }\n}\n");
      out.write("</script>\n");
      out.write("</head>\n");
      out.write("<body>\n\n\t");
      String breadcrumb1 = "<a href='admin/index.jsp'></a>";
      out.write("\n\t");
      String breadcrumb2 = "Poller Packages";
      out.write("\n\t");
      JspRuntimeLibrary.include(
          request,
          response,
          "/includes/header.jsp"
              + "?"
              + "title="
              + java.net.URLEncoder.encode("" + title)
              + "&"
              + "location="
              + "admin"
              + "&"
              + "help="
              + "monitoringadmin%2Fpolling%2FWTHelp_PollerPackageDowntimeModel.html"
              + "&"
              + "noPopOut="
              + "true"
              + "&"
              + "breadcrumb="
              + java.net.URLEncoder.encode("" + breadcrumb1)
              + "&"
              + "breadcrumb="
              + java.net.URLEncoder.encode("" + breadcrumb2),
          out,
          false);
      out.write("\n");
      out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n");
      out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t");
      out.write("<tr>\n\t\t");
      out.write("<td width=\"10\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n\t\t");
      out.write("<td>\n");
      out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\t");
      out.write("<form action=\"");
      out.print(WTTools.getMonServletURL(request));
      out.write("WTPollerPackages\" method=\"post\" name=\"downtime\" target=\"_parent\">\n\t  ");
      out.write("<input type=\"hidden\" name=\"action\" value=\"\">\n\t  ");
      out.write("<input type=\"hidden\" name=\"pkgidx\" value=\"\">\n\t  ");
      out.write("<input type=\"hidden\" name=\"dtidx\" value=\"\">\n\t  ");
      out.write("<input type=\"hidden\" name=\"dtbegin\" value=\"\">\n\t  ");
      out.write("<input type=\"hidden\" name=\"dtend\" value=\"\">\n\t  ");
      out.write("<input type=\"hidden\" name=\"dtinterval\" value=\"\">\n\n");
      out.write("<table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n     ");
      out.write("<tr>\n        ");
      out.write("<td colspan=\"4\">");
      out.write("<b>Downtime Model:");
      out.write("</b>");
      out.write("<a class=\"tt\" href=\"javascript: towerTip(");
      out.print(WTTips.TIP_POLLER_MON_SERVICE);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n    ");
      out.write("</tr>\n     ");
      out.write("<tr class=\"tableHeader\">\n        ");
      out.write("<td class=\"tableHeader\" width=\"25%\">Begin Time");
      out.write("<a class=\"tt\" href=\"javascript: towerTip(");
      out.print(WTTips.TIP_POLLER_DT_BEGIN);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableHeader\" width=\"25%\">End Time");
      out.write("<a class=\"tt\" href=\"javascript: towerTip(");
      out.print(WTTips.TIP_POLLER_DT_END);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableHeader\" width=\"25%\">Polling Interval");
      out.write("<a class=\"tt\" href=\"javascript: towerTip(");
      out.print(WTTips.TIP_POLLER_DT_INTERVAL);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n        ");
      out.write("<td class=\"tableHeader\" width=\"25%\">Action");
      out.write("</td>\n    ");
      out.write("</tr>\n        ");

      long daymilli = 24 * 60 * 60 * 1000; // 86400000
      long hourmlli = 60 * 60 * 1000; // 3600000;
      long minutemilli = 60 * 1000; // 60000;
      long secondmilli = 1000;

      String pattern2digit = "00";
      DecimalFormat df2digit = new DecimalFormat(pattern2digit);

      String pattern3digit = "000";
      DecimalFormat df3digit = new DecimalFormat(pattern3digit);

      long begin = 0;
      long end = 0;
      long interval = 0;
      String delete = null;
      long addbegin = 0;
      if (pkg != null) {
        Downtime[] ds = pkg.getDowntime();
        if (ds != null) {
          for (int i = 0; i < ds.length; i++) {
            Downtime d = ds[i];

            begin = d.getBegin();
            end = d.getEnd();
            interval = d.getInterval();
            delete = d.getDelete();

            long dtbegin = begin;
            long dtend = end;
            long dtinterval = interval;
            addbegin = begin;

            long dtbeginday = 0;
            long dtbeginhour = 0;
            long dtbeginminute = 0;
            long dtbeginsecond = 0;
            long dtbeginmillisecond = 0;

            long dtendday = 0;
            long dtendhour = 0;
            long dtendminute = 0;
            long dtendsecond = 0;
            long dtendmillisecond = 0;

            long dtintervalday = 0;
            long dtintervalhour = 0;
            long dtintervalminute = 0;
            long dtintervalsecond = 0;
            long dtintervalmillisecond = 0;

            if (dtbegin > 0) {
              dtbeginday = dtbegin / daymilli;
              dtbegin -= (dtbeginday * daymilli);
            }
            if (dtbegin > 0) {
              dtbeginhour = dtbegin / hourmlli;
              dtbegin -= (dtbeginhour * hourmlli);
            }
            if (dtbegin > 0) {
              dtbeginminute = dtbegin / minutemilli;
              dtbegin -= (dtbeginminute * minutemilli);
            }
            if (dtbegin > 0) {
              dtbeginsecond = dtbegin / secondmilli;
              dtbegin -= (dtbeginsecond * secondmilli);
            }
            if (dtbegin > 0) {
              dtbeginmillisecond = dtbegin;
            }

            if (dtend > 0) {
              dtendday = dtend / daymilli;
              dtend -= (dtendday * daymilli);
            }
            if (dtend > 0) {
              dtendhour = dtend / hourmlli;
              dtend -= (dtendhour * hourmlli);
            }
            if (dtend > 0) {
              dtendminute = dtend / minutemilli;
              dtend -= (dtendminute * minutemilli);
            }
            if (dtend > 0) {
              dtendsecond = dtend / secondmilli;
              dtend -= (dtendsecond * secondmilli);
            }
            if (dtend > 0) {
              dtendmillisecond = dtend;
            }

            if (dtinterval > 0) {
              dtintervalday = dtinterval / daymilli;
              dtinterval -= (dtintervalday * daymilli);
            }
            if (dtinterval > 0) {
              dtintervalhour = dtinterval / hourmlli;
              dtinterval -= (dtintervalhour * hourmlli);
            }
            if (dtinterval > 0) {
              dtintervalminute = dtinterval / minutemilli;
              dtinterval -= (dtintervalminute * minutemilli);
            }
            if (dtinterval > 0) {
              dtintervalsecond = dtinterval / secondmilli;
              dtinterval -= (dtintervalsecond * secondmilli);
            }
            if (dtinterval > 0) {
              dtintervalmillisecond = dtinterval;
            }

            out.write("\n                    ");
            out.write("<!--\n            \t\t");
            out.write("<TR>\n                \t\t");
            out.write("<TD align=\"center\">\n                \t\t");
            out.write("<INPUT name=\"dtbegin_");
            out.print(String.valueOf(i));
            out.write("\" type=\"text\" value=\"");
            out.print(begin);
            out.write("\" disabled>\n                \t\t");
            out.write("</TD>\n                \t\t");
            out.write("<TD align=\"center\">");
            out.write("<INPUT name=\"dtend_");
            out.print(String.valueOf(i));
            out.write("\" type=\"text\" value=\"");
            out.print(end);
            out.write("\" disabled>");
            out.write("</TD>\n                \t\t");
            out.write("<TD align=\"center\">");
            out.write("<INPUT name=\"dtinterval_");
            out.print(String.valueOf(i));
            out.write("\" type=\"text\" value=\"");
            out.print(interval);
            out.write("\" disabled>");
            out.write("</TD>\n                \t\t");
            out.write("<TD align=\"center\">");
            out.write("<INPUT name=\"dtdel_");
            out.print(String.valueOf(i));
            out.write("\" type=\"checkbox\" value=\"true\" ");
            if (delete != null && delete.equals("true")) {
              out.write("checked");
            }
            out.write(" disabled>");
            out.write("</TD>\n                \t\t");
            out.write("<TD align=\"center\">\n                            ");
            if ((i + 2) == ds.length) {
              out.write("\n                                ");
              out.write("<a HREF=\"javascript:removeDowntime('");
              out.print(i);
              out.write("')\" title=\"Remove Downtime Model\">Remove");
              out.write("</a>\n                            ");
            } else {
              out.write("\n                               &nbsp;\n                            ");
            }
            out.write("\n                        ");
            out.write("</TD>\n            \t\t");
            out.write("</TR>\n            \t\t-->\n\n                \t\t");
            if (i < (ds.length - 1)) {
              out.write("\n                           ");
              out.write("<tr class=\"");
              out.print(((i % 2) == 0) ? "tableRowLIght" : "tableRowDark");
              out.write("\">\n                \t\t");
              out.write("<td class=\"tableText\">\n                    \t\t");
              out.print(dtbeginday);
              out.write(" days ");
              out.print(df2digit.format(dtbeginhour));
              out.write(":");
              out.print(df2digit.format(dtbeginminute));
              out.write(":");
              out.print(df2digit.format(dtbeginsecond));
              out.write(":");
              out.print(df3digit.format(dtbeginmillisecond));
              out.write("\n                        ");
              out.write("</td>\n                \t\t");
              out.write("<td class=\"tableText\">\n                   \t\t    ");
              out.print(dtendday);
              out.write(" days ");
              out.print(df2digit.format(dtendhour));
              out.write(":");
              out.print(df2digit.format(dtendminute));
              out.write(":");
              out.print(df2digit.format(dtendsecond));
              out.write(":");
              out.print(df3digit.format(dtendmillisecond));
              out.write("\n                        ");
              out.write("</td>\n                \t\t");
              out.write("<td class=\"tableText\">\n                    \t\t");
              out.print(dtintervalday);
              out.write(" days ");
              out.print(df2digit.format(dtintervalhour));
              out.write(":");
              out.print(df2digit.format(dtintervalminute));
              out.write(":");
              out.print(df2digit.format(dtintervalsecond));
              out.write(":");
              out.print(df3digit.format(dtintervalmillisecond));
              out.write("\n                        ");
              out.write("</td>\n                        ");
              out.write("<td class=\"tableText\">\n                                 ");
              if (i == (ds.length - 2)) {
                out.write("\n                                     ");
                out.write("<a href=\"javascript:removeDowntime('");
                out.print(i);
                out.write("')\" title=\"Remove Downtime Model\">Remove");
                out.write("</a>");
                out.write("</td>\n                                 ");
              }
              out.write("\n                        ");
              out.write("</td>\n                \t\t");
            } else {
              out.write("\n\t\t\t\t\t\t");
              out.write("<tr>");
              out.write("<td colspan=\"3\">&nbsp;");
              out.write("</td>");
              out.write("</tr>\n                           ");
              out.write("<tr class=\"tableHeader\">\n                \t\t");
              out.write("<td class=\"tableHeader\" colspan=\"3\">\n                            ");
              if ((delete == null || !delete.equals("true")) && end == 0 && interval > 0) {
                out.write("\n                    \t\tAfter\n                    \t\t");
                out.write("<b>\n                \t\t    ");
                if (dtbeginday > 0) {
                  out.print(dtbeginday);
                  out.write(" days");
                }
                out.write("\n                \t\t    ");
                if (dtbeginhour > 0) {
                  out.print(dtbeginhour);
                  out.write(" hr");
                }
                out.write("\n                \t\t    ");
                if (dtbeginminute > 0) {
                  out.print(dtbeginminute);
                  out.write(" min");
                }
                out.write("\n                \t\t    ");
                if (dtbeginsecond > 0) {
                  out.print(dtbeginsecond);
                  out.write(" sec");
                }
                out.write("\n                \t\t    ");
                if (dtbeginmillisecond > 0) {
                  out.print(dtbeginmillisecond);
                  out.write(" ms");
                }
                out.write("\n                    \t\t");
                out.write(
                    "</b>\n                    \t\tthe system will continue to poll downed nodes at a\n                    \t\t");
                out.write("<b>\n                \t\t    ");
                if (dtintervalday > 0) {
                  out.print(dtintervalday);
                  out.write(" day");
                }
                out.write("\n                \t\t    ");
                if (dtintervalhour > 0) {
                  out.print(dtintervalhour);
                  out.write(" hr");
                }
                out.write("\n                \t\t    ");
                if (dtintervalminute > 0) {
                  out.print(dtintervalminute);
                  out.write(" min");
                }
                out.write("\n                \t\t    ");
                if (dtintervalsecond > 0) {
                  out.print(dtintervalsecond);
                  out.write(" sec");
                }
                out.write("\n                \t\t    ");
                if (dtintervalmillisecond > 0) {
                  out.print(dtintervalmillisecond);
                  out.write(" ms");
                }
                out.write("\n                            ");
                out.write(
                    "</b>\n                            interval.\n                            ");
              }
              out.write("\n                        ");
              out.write("</td>\n                                   ");
              if (i == (ds.length - 2)) {
                out.write("\n                                   ");
              } else {
                out.write("\n                                      ");
                out.write("<td class=\"tableHeader\">&nbsp;");
                out.write("</td>\n                                   ");
              }
              out.write("\n                \t\t");
            }
            out.write("\n            \t\t");
            out.write("</tr>\n            \t\t");
          }
        }
      }

      out.write("\n        ");
      out.write("<!--\n    \t");
      out.write("<TR>\n        \t");
      out.write("<TD align=\"center\">");
      out.write("<INPUT name=\"dtbegin\" type=\"text\" value=\"");
      out.print(begin);
      out.write("\" readonly>");
      out.write("</TD>\n        \t");
      out.write("<TD align=\"center\">");
      out.write("<INPUT name=\"dtend\" type=\"text\" value=\"\">");
      out.write("</TD>\n        \t");
      out.write("<TD align=\"center\">");
      out.write("<INPUT name=\"dtinterval\" type=\"text\" value=\"\">");
      out.write("</TD>\n        \t");
      out.write("<TD align=\"center\">");
      out.write("<INPUT name=\"dtdel\" type=\"checkbox\" value=\"true\" disabled>");
      out.write("</TD>\n        \t");
      out.write("<TD align=\"center\">");
      out.write("<a HREF=\"javascript:addDowntime()\" title=\"Add Downtime Model\">Add Downtime");
      out.write("</a>");
      out.write("</TD>\n    \t");
      out.write("</TR>\n    \t-->\n    \t");

      long dtbeginday = 0;
      long dtbeginhour = 0;
      long dtbeginminute = 0;
      long dtbeginsecond = 0;
      long dtbeginmillisecond = 0;

      long dtendday = 0;
      long dtendhour = 0;
      long dtendminute = 0;
      long dtendsecond = 0;
      long dtendmillisecond = 0;

      long dtintervalday = 0;
      long dtintervalhour = 0;
      long dtintervalminute = 0;
      long dtintervalsecond = 0;
      long dtintervalmillisecond = 0;

      if (addbegin > 0) {
        dtbeginday = addbegin / daymilli;
        addbegin = addbegin - (dtbeginday * daymilli);
      }
      if (addbegin > 0) {
        dtbeginhour = addbegin / hourmlli;
        addbegin = addbegin - (dtbeginhour * hourmlli);
      }
      if (addbegin > 0) {
        dtbeginminute = addbegin / minutemilli;
        addbegin = addbegin - (dtbeginminute * minutemilli);
      }
      if (addbegin > 0) {
        dtbeginsecond = addbegin / secondmilli;
        addbegin = addbegin - (dtbeginsecond * secondmilli);
      }
      if (addbegin > 0) {
        dtbeginmillisecond = addbegin;
      }

      out.write("\n    \t");
      out.write("<tr class=\"tableRowLight\">\n        \t");
      out.write("<td>\n        \t  ");
      out.write("<input type=\"hidden\" name=\"dtbeginday\" value=\"");
      out.print(dtbeginday);
      out.write("\">\n        \t  ");
      out.write("<input type=\"hidden\" name=\"dtbeginhour\" value=\"");
      out.print(dtbeginhour);
      out.write("\">\n        \t  ");
      out.write("<input type=\"hidden\" name=\"dtbeginminute\" value=\"");
      out.print(dtbeginminute);
      out.write("\">\n        \t  ");
      out.write("<input type=\"hidden\" name=\"dtbeginsecond\" value=\"");
      out.print(dtbeginsecond);
      out.write("\">\n        \t  ");
      out.write("<input type=\"hidden\" name=\"dtbeginmillisecond\" value=\"");
      out.print(dtbeginmillisecond);
      out.write("\">\n        \t    ");
      out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Days: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.print(dtbeginday);
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Hours: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.print(dtbeginhour);
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Minutes: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.print(dtbeginminute);
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Seconds: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.print(dtbeginsecond);
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Milliseconds: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.print(dtbeginmillisecond);
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t    ");
      out.write("</table>\n        \t");
      out.write("</td>\n        \t");
      out.write("<td>\n        \t    ");
      out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Days: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtendday\">\n\t\t        ");
      for (int i = 0; i <= 365; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtendday == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Hours: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtendhour\">\n\t\t        ");
      for (int i = 0; i < 24; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtendhour == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Minutes: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtendminute\">\n\t\t        ");
      for (int i = 0; i < 60; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtendminute == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Seconds: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtendsecond\">\n\t\t        ");
      for (int i = 0; i < 60; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtendsecond == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Milliseconds: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtendmillisecond\">\n\t\t        ");
      for (int i = 0; i < 1000; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtendmillisecond == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t    ");
      out.write("</table>\n\n         \t");
      out.write("</td>\n        \t");
      out.write("<td>\n        \t    ");
      out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Days: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtintervalday\">\n\t\t        ");
      for (int i = 0; i <= 365; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtintervalday == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Hours: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtintervalhour\">\n\t\t        ");
      for (int i = 0; i < 24; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtintervalhour == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Minutes: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtintervalminute\">\n\t\t        ");
      for (int i = 0; i < 60; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtintervalminute == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Seconds: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtintervalsecond\">\n\t\t        ");
      for (int i = 0; i < 60; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtintervalsecond == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t        ");
      out.write("<tr class=\"tableRowLight\">\n        \t            ");
      out.write("<td nowrap>Milliseconds: ");
      out.write("</td>\n        \t            ");
      out.write("<td nowrap>");
      out.write("<select name=\"dtintervalmillisecond\">\n\t\t        ");
      for (int i = 0; i < 1000; i++) {
        out.write("\n\t\t            ");
        out.write("<option value=");
        out.print(i);
        out.write(" ");
        if (dtintervalmillisecond == i) {
          out.write("selected");
        }
        out.write(">");
        out.print(df3digit.format(i));
        out.write("\n                ");
      }
      out.write("\n\t\t      ");
      out.write("</select>");
      out.write("</td>\n        \t        ");
      out.write("</tr>\n        \t    ");
      out.write("</table>\n        \t");
      out.write("</td>\n         \t");
      out.write("<!--\n        \t");
      out.write("<TD align=\"center\">\n        \t");
      out.write("<INPUT name=\"dtdel\" type=\"checkbox\" value=\"true\" disabled>\n        \t");
      out.write("</TD>\n        \t-->\n        \t");
      out.write("<td align=\"center\" nowrap>");
      out.write("<a href=\"javascript:addDowntime()\" title=\"Add Downtime Model\">Add Downtime");
      out.write("</a>");
      out.write("</td>\n    ");
      out.write("</tr>\n    ");
      out.write("<tr class=\"tableRowLight\">\n        ");
      out.write("<td class=\"tableText\" colspan=\"4\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n    ");
      out.write("</tr>\n     ");
      out.write("<tr>\n        ");
      out.write("<td colspan=\"4\">");
      out.write("<br />\n        ");
      out.write("<a href=\"javascript:restoreDefaultDowntime()\">");
      out.write(
          "<img src=\"/wt-portal/images/buttons/btn_restore_defaults.gif\" border=\"0\" alt=\"Restore Defaults\">");
      out.write("</a>\n        \n        ");
      out.write("<!--");
      out.write(
          "<input type=\"submit\" name=\"button\" onclick=\"return restoreDefaultDowntime()\" value=\"Restore Defaults\" title=\"Restore Downtime Model Defaults\">-->");
      out.write("<br />\n        ");
      out.write("</td>\n    ");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("</form>\n");
      out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t");
      out.write("</td>\n\t");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<!-- END FRAMING TABLE:close tags-->\n");
      out.write("<p>\n");
      JspRuntimeLibrary.include(
          request, response, "/includes/footer.jsp" + "?" + "location=" + "admin", out, false);
      out.write("\n\n  ");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=utf-8");
      pageContext =
          _jspxFactory.getPageContext(
              this, request, response, "/jsp/GeneralError.jsp", true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n");
      out.write("\n");
      out.write("\n");
      out.write("\n\n");
      out.write("\n");
      out.write("\n\n");
      out.write("\n");
      java.util.Date now = null;
      synchronized (pageContext) {
        now = (java.util.Date) pageContext.getAttribute("now", PageContext.PAGE_SCOPE);
        if (now == null) {
          try {
            now =
                (java.util.Date)
                    java.beans.Beans.instantiate(
                        this.getClass().getClassLoader(), "java.util.Date");
          } catch (ClassNotFoundException exc) {
            throw new InstantiationException(exc.getMessage());
          } catch (Exception exc) {
            throw new ServletException("Cannot create bean of class " + "java.util.Date", exc);
          }
          pageContext.setAttribute("now", now, PageContext.PAGE_SCOPE);
        }
      }
      out.write("\n\n");
      out.write("\n");
      out.write("<script type=\"text/javascript\" src=\"");
      if (_jspx_meth_c_url_0(pageContext)) return;
      out.write("\">");
      out.write("</script>\n\n");
      out.write("\n");
      if (_jspx_meth_html_xhtml_0(pageContext)) return;
      out.write("\n");
      out.write("\n\n");
      out.write("\n");
      out.write("\n");
      out.write("\n\n\n\n");
      out.write("<html>\n");
      out.write("<head>\n  ");
      out.write("<title>WebTelemetry - Admin Settings | System Management | License Management");
      out.write("</title>\n  ");
      out.write("<base HREF=\"");
      out.print(org.opennms.web.Util.calculateUrlBase(request));
      out.write("\" />\n  ");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n  ");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\n");
      out.write("</HEAD>\n\n");
      out.write("<SCRIPT LANGUAGE=JAVASCRIPT>\nfunction checkError()\n{\n\t");
      if (request.getSession().getAttribute("thErrorMsg") != null) {
        out.write("\n\talert(\"");
        out.print(request.getSession().getAttribute("thErrorMsg"));
        out.write("\");\n    ");
        request.getSession().removeAttribute("thErrorMsg");
        out.write("\n\t");
      }
      out.write("\n\t");
      if (request.getAttribute("thErrorMsg") != null) {
        out.write("\n\talert(\"");
        out.print(request.getAttribute("thErrorMsg"));
        out.write("\");\n    ");
        request.removeAttribute("thErrorMsg");
        out.write("\n\t");
      }
      out.write("\n}\n");
      out.write("</SCRIPT>\n");
      out.write("<body onload=\"checkError();\">\n");
      /* ----  c:import ---- */
      org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 =
          (org.apache.taglibs.standard.tag.el.core.ImportTag)
              _jspx_tagPool_c_import_url_context.get(
                  org.apache.taglibs.standard.tag.el.core.ImportTag.class);
      _jspx_th_c_import_0.setPageContext(pageContext);
      _jspx_th_c_import_0.setParent(null);
      _jspx_th_c_import_0.setContext("/wt-monitor");
      _jspx_th_c_import_0.setUrl("/includes/header.jsp");
      int[] _jspx_push_body_count_c_import_0 = new int[] {0};
      try {
        int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag();
        if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
            javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
            _jspx_push_body_count_c_import_0[0]++;
            out = _bc;
            _jspx_th_c_import_0.setBodyContent(_bc);
            _jspx_th_c_import_0.doInitBody();
          }
          do {
            out.write("\n    ");
            if (_jspx_meth_c_param_0(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n    ");
            if (_jspx_meth_c_param_1(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n    ");
            if (_jspx_meth_c_param_2(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n");
            int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody();
            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
          } while (true);
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
            out = pageContext.popBody();
          _jspx_push_body_count_c_import_0[0]--;
        }
        if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody();
        _jspx_th_c_import_0.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_import_0.doFinally();
        _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0);
      }
      out.write("\n\n");

      String errorMsg = (String) request.getAttribute("error");
      if (errorMsg != null && !errorMsg.equals("")) {

        out.write("\n\n");
        out.write("<table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n    ");
        out.write("<tr class=\"tableHeader\">\n        ");
        out.write("<td class=\"tableHeader\">Internal Error");
        out.write("</td>\n    ");
        out.write("</tr>\n    ");
        out.write("<tr class=\"error\" >\n        ");
        out.write("<td class=\"error\">");
        out.write("<br>");
        out.print(errorMsg);
        out.write("\n        ");
        out.write("<br />");
        out.write("<br />");
        out.write("<a href=\"mailto:[email protected]\">[email protected]");
        out.write("</a>");
        out.write("<br />&nbsp;");
        out.write("</td>\n    ");
        out.write("</tr>\n");
        out.write("</table>\n");
      }
      out.write("\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n");
      out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t");
      out.write("<tr>\n\t\t");
      out.write("<td width=\"10\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry LLC\">");
      out.write("</td>\n\t\t");
      out.write("<td>\n");
      out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\n");

      LicenseManager lim = (LicenseManager) request.getAttribute("licenseManager");
      boolean valid = false;
      boolean bIsAdmin = ((Boolean) request.getAttribute("bIsAdmin")).booleanValue();
      if (lim == null) {

        out.write("\n        ");
        out.write("<p class=\"error\">License File not found!\n        ");
        if (bIsAdmin) {
          out.write("\n            Please install a license file to run WebTelemetry.\n        ");
        } else {
          out.write(
              "\n            Please contact your System Administrator to rectify this problem.\n        ");
        }
        out.write("\n        ");
        out.write("</p>\n");

      } else {
        if (!lim.isSigValid()) {

          out.write("<p class=\"error\">License File corrupted!\n           ");
          if (bIsAdmin) {
            out.write(
                "\n                Please install a new license file to run WebTelemetry.\n           ");
          } else {
            out.write(
                "\n                Please contact your System Administrator to rectify this problem.\n           ");
          }
          out.write("\n              ");
          out.write("</p>");

        } else if (lim.daysLeft() == 0) {

          out.write("<p class=\"error\">License File expired!\n\t        ");
          if (bIsAdmin) {
            out.write(
                "\n\t            Please install a license file to run WebTelemetry.\n\t        ");
          } else {
            out.write(
                "\n\t            Please contact your System Administrator to rectify this problem.\n\t        ");
          }
          out.write("\n            ");
          out.write("</p>");

        } else {
          valid = true;
        }
      }

      out.write("\n");
      out.write("<table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
      if (bIsAdmin) {
        out.write("\n    ");
        out.write("<tr>\n\t\t");
        if (lim != null) {
          out.write("\n\t\t");
          out.write("<td colspan=\"2\" align=\"right\" valign=\"top\">\n\t\t");
        } else {
          out.write("\n\t\t");
          out.write("<td colspan=\"2\" align=\"left\" valign=\"top\">");
          out.write("<br>\n\t\t");
        }
        out.write("\n\t\t");
        out.write("<a href=\"/wt-core/license/manager.do?currentCommand=");
        out.print(WTLicenseForm.LICENSE_UPLOAD);
        out.write("\">");
        out.write(
            "<img src=\"/wt-portal/images/buttons/btn_install_license.gif\" border=\"0\" alt=\"Install a New License\" vspace=\"4\">");
        out.write("</a>\n        ");
        out.write("<a class=\"tt\" href=\"javascript:towerTip(");
        out.print(WTTips.TIP_LICENSE_UPLOAD);
        out.write(");\" title=\"Telemetry Tip\">");
        out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
        out.write("</a>\n&nbsp;&nbsp;\n\t\t");
        out.write("\n");
        out.write("</td>");
        out.write("</tr>\n");
      }
      out.write("\n    ");
      out.write("<tr>\n        ");
      out.write("<td colspan=\"2\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"4\" width=\"10\" border=\"0\" alt=\"WebTelemetry LLC\">");
      out.write("</td>\n    ");
      out.write("</tr>\n\n");

      if (lim != null) {
        String licStatus =
            valid ? "<span class='success'>Valid</span>" : "<span class='error'>Invalid</span>";
        String exp = lim.getFeature(License.WT_EXPIRATION_FIELD_NAME);

        int trCount = -1;

        out.write("\n\t     ");
        out.write("<tr class=\"tableHeader\">\n\t        ");
        out.write("<td class=\"tableHeader\" width=\"70%\">Attribute");
        out.write("<a class=\"tt\" href=\"javascript: towerTip(");
        out.print(WTTips.TIP_LICENSE_ATTRIBUTES);
        out.write(");\" title=\"Telemetry Tip\">");
        out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
        out.write("</a>");
        out.write("</td>\n\t        ");
        out.write("<td class=\"tableHeader\" width=\"30%\">Value");
        out.write("</td>\n\t    ");
        out.write("</tr>\n\n        ");
        String trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark";
        out.write("\n\t    ");
        out.write("<tr class=\"");
        out.print(trColor);
        out.write("\">\n\t        ");
        out.write("<td class=\"tableText\">Support License");
        out.write("</td>\n\t        ");
        out.write("<td class=\"tableText\">");
        out.print(licStatus);
        out.write("</td>\n\t    ");
        out.write("</tr>\n\n        ");
        trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark";
        out.write("\n\t    ");
        out.write("<tr class=\"");
        out.print(trColor);
        out.write("\">\n\t        ");
        out.write("<td class=\"tableText\">Support Licensor");
        out.write("</td>\n");
        out.write("<!-- \n\t        ");
        out.write("<td class=\"tableText\">");
        out.print(lim.getFeature(License.WT_LICENSOR_FIELD_NAME));
        out.write("</td>\n\t\t-->\n\t\t ");
        out.write("<td class=\"tableText\">WebTelemetry LLC");
        out.write("</td>\n\t    ");
        out.write("</tr>\n\n        ");
        trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark";
        out.write("\n\t    ");
        out.write("<tr class=\"");
        out.print(trColor);
        out.write("\">\n\t        ");
        out.write("<td class=\"tableText\">Support Licensee");
        out.write("</td>\n\n");
        out.write("<!--\n\t        ");
        out.write("<td class=\"tableText\">");
        out.print(lim.getFeature(License.WT_LICENSEE_FIELD_NAME));
        out.write("</td>\n-->\n\t\t ");
        out.write("<td class=\"tableText\">WebTelemetry LLC");
        out.write("</td>\n\n\t    ");
        out.write("</tr>\n\n\n");
        out.write("\n\n        ");
        trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark";
        out.write("\n\t    ");
        out.write("<tr class=\"");
        out.print(trColor);
        out.write("\">\n\t        ");
        out.write("<td class=\"tableText\">Discovery Engine");
        out.write("</td>\n\t    ");

        String safariStatus =
            (Integer.parseInt(lim.getFeature(License.WT_SAFARI_MASTER_ACCOUNT_ID_FIELD_NAME)) > 0
                    && Integer.parseInt(lim.getFeature(License.WT_SAFARI_USER_COUNT_FIELD_NAME))
                        > 0)
                ? "Enabled"
                : "Disabled";
        if (!"Disabled".equals(safariStatus)) {
          int safariDaysLeft = lim.daysLeft(License.WT_SAFARI_EXPIRATION_FIELD_NAME);
          if (safariDaysLeft == 0) safariStatus = "Expired";
        }

        out.write("\n\t        ");
        out.write("<td class=\"tableText\">");
        out.print(safariStatus);
        out.write("</td>\n\t    ");
        out.write("</tr>\n\n\t    ");

        if (!"Disabled".equals(safariStatus)) {

          out.write("\n            ");
          trColor = (++trCount % 2 == 0) ? "tableRowLight" : "tableRowDark";
          out.write("\n\t\t    ");
          out.write("<tr class=\"");
          out.print(trColor);
          out.write("\">\n\t\t        ");
          out.write("<td class=\"tableText\">Smart Discovery Expiration Date");
          out.write("</td>\n\t\t        ");
          out.write("<td class=\"tableText\">");
          out.print(lim.getFeature(License.WT_SAFARI_EXPIRATION_FIELD_NAME));
          out.write("\n\t\t    ");
          out.write("</tr>\n\t    ");
        }

        out.write("    \n");
      }

      out.write("\n");
      out.write("</table>\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t");
      out.write("</td>\n\t");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<!-- END FRAMING TABLE:close tags-->\n");
      out.write("<br>\n\n");
      JspRuntimeLibrary.include(
          request,
          response,
          "../includes/footer.jsp"
              + "?"
              + "location="
              + "admin"
              + "&"
              + "help="
              + "WTHelp_License.html",
          out,
          false);
      out.write("\n\n  ");
      out.write("</BODY>\n ");
      out.write("<!-- end list-organiztion.jsp -->\n");
      out.write("</HTML>\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
Example #9
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=UTF-8");
      pageContext =
          _jspxFactory.getPageContext(this, request, response, "/error.jsp", true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      /** This include page ensures that the handler exists and is ready to be accessed. */
      CrawlJobHandler handler = (CrawlJobHandler) application.getAttribute("handler");
      Heritrix heritrix = (Heritrix) application.getAttribute("heritrix");

      // If handler is empty then this is the first time this bit of code is
      // being run since the server came online. In that case get or create the
      // handler.
      if (handler == null) {
        if (Heritrix.isSingleInstance()) {
          heritrix = Heritrix.getSingleInstance();
          handler = heritrix.getJobHandler();
          application.setAttribute("heritrix", heritrix);
          application.setAttribute("handler", handler);
        } else {
          // TODO:
          // If we get here, then there are multiple heritrix instances
          // and we have to put up a screen allowing the user choose between.
          // Otherwise, there is no Heritrix instance.  Thats a problem.
          throw new RuntimeException(
              "No heritrix instance (or multiple "
                  + "to choose from and we haven't implemented this yet)");
        }
      }

      // ensure controller's settingsHandler is always thread-installed
      // in web ui threads
      if (handler != null) {
        CrawlJob job = handler.getCurrentJob();
        if (job != null) {
          CrawlController controller = job.getController();
          if (controller != null) {
            controller.installThreadContextSettingsHandler();
          }
        }
      }

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

      String title = "Help";
      int tab = 6;

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

      String currentHeritrixName =
          (heritrix == null)
              ? "No current Heritrix instance"
              : (heritrix.getMBeanName() == null)
                  ? heritrix.getInstances().keySet().iterator().next().toString()
                  : heritrix.getMBeanName().toString();

      /**
       * An include file that handles the "look" and navigation of a web page. Include at top (where
       * you would normally begin the HTML code). If used, the include "foot.jsp" should be included
       * at the end of the HTML code. It will close any table, body and html tags left open in this
       * one. Any custom HTML code is thus placed between the two.
       *
       * <p>The following variables must exist prior to this file being included:
       *
       * <p>String title - Title of the web page int tab - Which to display as 'selected'. 0 -
       * Console 1 - Jobs 2 - Profiles 3 - Logs 4 - Reports 5 - Settings 6 - Help
       *
       * <p>SimpleHandler handler - In general this is provided by the include page 'handler.jsp'
       * which should be included prior to this one.
       *
       * @author Kristinn Sigurdsson
       */
      String shortJobStatus = null;
      if (handler.getCurrentJob() != null) {
        shortJobStatus = TextUtils.getFirstWord(handler.getCurrentJob().getStatus());
      }
      String favicon = System.getProperties().getProperty("heritrix.favicon", "h.ico");

      out.write("\n");

      StatisticsTracker stats = null;
      if (handler.getCurrentJob() != null) {
        // Assume that StatisticsTracker is being used.
        stats = (StatisticsTracker) handler.getCurrentJob().getStatisticsTracking();
      }

      out.write("\n");
      out.write("\n\n");
      out.write("<html>\n    ");
      out.write("<head>\n    \t");
      out.write(
          "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n        ");
      out.write("<title>Heritrix: ");
      out.print(title);
      out.write("</title>\n        ");
      out.write("<link rel=\"stylesheet\" \n            href=\"");
      out.print(request.getContextPath());
      out.write("/css/heritrix.css\">\n        ");
      out.write("<link rel=\"icon\" href=\"");
      out.print(request.getContextPath());
      out.write("/images/");
      out.print(favicon);
      out.write("\" type=\"image/x-icon\" />\n        ");
      out.write("<link rel=\"shortcut icon\" href=\"");
      out.print(request.getContextPath());
      out.write("/images/");
      out.print(favicon);
      out.write("\" type=\"image/x-icon\" />\n        ");
      out.write("<script src=\"/js/util.js\">\n        ");
      out.write("</script>\n    ");
      out.write("</head>\n\n    ");
      out.write("<body>\n        ");
      out.write(
          "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n            ");
      out.write("<tr>\n                ");
      out.write("<td>\n                    ");
      out.write(
          "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"100%\">\n                        ");
      out.write("<tr>\n                            ");
      out.write(
          "<td height=\"60\" width=\"155\" valign=\"top\" nowrap>\n                                ");
      out.write(
          "<table border=\"0\" width=\"155\" cellspacing=\"0\" cellpadding=\"0\" height=\"60\">\n                                    ");
      out.write("<tr>\n                                        ");
      out.write(
          "<td align=\"center\" height=\"40\" valign=\"bottom\">\n                                            ");
      out.write("<a border=\"0\" \n                                            href=\"");
      out.print(request.getContextPath());
      out.write("/index.jsp\">");
      out.write("<img border=\"0\" src=\"");
      out.print(request.getContextPath());
      out.write("/images/logo.gif\" height=\"37\" width=\"145\">");
      out.write("</a>\n                                        ");
      out.write("</td>\n                                    ");
      out.write("</tr>\n                                    ");
      out.write("<tr>\n                                        ");
      out.write("<td class=\"subheading\">\n                                            ");
      out.print(title);
      out.write("\n                                        ");
      out.write("</td>\n                                    ");
      out.write("</tr>\n                                ");
      out.write("</table>\n                            ");
      out.write("</td>\n                            ");
      out.write(
          "<td width=\"5\" nowrap>\n                                &nbsp;&nbsp;\n                            ");
      out.write("</td>\n                            ");
      out.write("<td width=\"460\" align=\"left\" nowrap>\n                                ");
      out.write(
          "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"60\">\n                                    ");
      out.write("<tr>\n                                        ");
      out.write("<td colspan=\"2\" nowrap>\n                                            ");

      SimpleDateFormat sdf = new SimpleDateFormat("MMM. d, yyyy HH:mm:ss");
      sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));

      out.write("\n                                            ");
      out.write("<b>\n                                                Status as of ");
      out.write("<a style=\"color: #000000\" href=\"");
      out.print(request.getRequestURL());
      out.write("\">");
      out.print(sdf.format(new java.util.Date()));
      out.write(" GMT");
      out.write("</a>\n                                            ");
      out.write(
          "</b>\n                                            &nbsp;&nbsp;\n                                            ");
      out.write("<span style=\"text-align:right\">\n                                            ");
      out.write(
          "<b>\n                                                Alerts: \n                                            ");
      out.write("</b>\n                                            ");
      if (heritrix.getAlertsCount() == 0) {
        out.write("\n                                                ");
        out.write("<a style=\"color: #000000; text-decoration: none\" href=\"");
        out.print(request.getContextPath());
        out.write("/console/alerts.jsp\">no alerts");
        out.write("</a>\n                                            ");
      } else if (heritrix.getNewAlertsCount() > 0) {
        out.write("\n                                                ");
        out.write("<b>");
        out.write("<a href=\"");
        out.print(request.getContextPath());
        out.write("/console/alerts.jsp\">");
        out.print(heritrix.getAlerts().size());
        out.write(" (");
        out.print(heritrix.getNewAlertsCount());
        out.write(" new)");
        out.write("</a>");
        out.write("</b>\n                                            ");
      } else {
        out.write("\n                                                ");
        out.write("<a style=\"color: #000000\" href=\"");
        out.print(request.getContextPath());
        out.write("/console/alerts.jsp\">");
        out.print(heritrix.getAlertsCount());
        out.write(" (");
        out.print(heritrix.getNewAlertsCount());
        out.write(" new)");
        out.write("</a>\n                                            ");
      }
      out.write("\n                                            ");
      out.write("</span>\n                                        ");
      out.write("</td>\n                                    ");
      out.write("</tr>\n                                    ");
      out.write("<tr>\n                                        ");
      out.write("<td valign=\"top\" nowrap>\n\t\t\t\t\t\t\t\t\t\t");
      out.print(
          handler.isRunning()
              ? "<span class='status'>Crawling Jobs</span>"
              : "<span class='status'>Holding Jobs</span>");
      out.write("<i>&nbsp;");
      out.write("</i>\n\t\t\t\t\t\t\t\t\t\t");
      out.write("</td>\n\t\t\t\t\t\t\t\t\t\t");
      out.write("<td valign=\"top\" align=\"right\" nowrap>\n\t\t\t\t\t\t\t\t\t\t");

      if (handler.isRunning() || handler.isCrawling()) {
        if (handler.getCurrentJob() != null) {
          out.write("\n\t\t\t\t\t\t\t\t\t\t");
          out.write("<span class='status'>\n\t\t\t\t\t\t\t\t\t\t");
          out.print(shortJobStatus);
          out.write("</span> job:\n\t\t\t\t\t\t\t\t\t\t");
          out.write("<i>");
          out.print(handler.getCurrentJob().getJobName());
          out.write("</i>\n\t\t\t\t\t\t\t\t\t\t");

        } else {
          out.println("No job ready <a href=\"");
          out.println(request.getContextPath());
          out.println("/jobs.jsp\" style='color: #000000'>(create new)</a>");
        }
      }

      out.write("\n\t\t\t\t\t\t\t\t\t\t");
      out.write("</td>\n                                    ");
      out.write("</tr>\n                                    ");
      out.write("<tr>\n                                        ");
      out.write("<td nowrap>\n                                            ");
      out.print(handler.getPendingJobs().size());
      out.write(
          "\n                                            jobs\n                                            ");
      out.write("<a style=\"color: #000000\" href=\"");
      out.print(request.getContextPath());
      out.write("/jobs.jsp#pending\">pending");
      out.write("</a>,\n                                            ");
      out.print(handler.getCompletedJobs().size());
      out.write("\n                                            ");
      out.write("<a style=\"color: #000000\" href=\"");
      out.print(request.getContextPath());
      out.write("/jobs.jsp#completed\">completed");
      out.write(
          "</a>\n                                            &nbsp;\n                                        ");
      out.write("</td>\n                                        ");
      out.write("<td nowrap align=\"right\">\n                                            ");
      if (handler.isCrawling()) {
        out.write("\n                                                    ");
        out.print((stats != null) ? stats.successfullyFetchedCount() : 0);
        out.write(" URIs in \n\t\t                                            ");
        out.print(
            ArchiveUtils.formatMillisecondsToConventional(
                ((stats != null) ? (stats.getCrawlerTotalElapsedTime()) : 0), false));
        out.write("\n\t\t                                            (");
        out.print(
            ArchiveUtils.doubleToString(
                ((stats != null) ? stats.currentProcessedDocsPerSec() : 0), 2));
        out.write("/sec)\n                                            ");
      }
      out.write("\n                                        ");
      out.write("</td>\n                                    ");
      out.write("</tr>\n                                ");
      out.write("</table>\n                            ");
      out.write("</td>\n                        ");
      out.write("</tr>\n                    ");
      out.write("</table>\n                ");
      out.write("</td>\n                ");
      out.write("<td width=\"100%\" nowrap>\n                    &nbsp;\n                ");
      out.write("</td>\n            ");
      out.write("</tr>\n            ");
      out.write("<tr>\n                ");
      out.write("<td bgcolor=\"#0000FF\" height=\"1\" colspan=\"4\">\n                ");
      out.write("</td>\n            ");
      out.write("</tr>\n            ");
      out.write("<tr>\n                ");
      out.write("<td colspan=\"4\" height=\"20\">\n                    ");
      out.write(
          "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"20\">\n                        ");
      out.write("<tr>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 0 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/index.jsp\" class=\"tab_text");
      out.print(tab == 0 ? "_selected" : "");
      out.write("\">Console");
      out.write("</a>\n                            ");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 1 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/jobs.jsp\" class=\"tab_text");
      out.print(tab == 1 ? "_selected" : "");
      out.write("\">Jobs");
      out.write("</a>\n                            ");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 2 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/profiles.jsp\" class=\"tab_text");
      out.print(tab == 2 ? "_selected" : "");
      out.write("\">Profiles");
      out.write("</a>\n                            ");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 3 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/logs.jsp\" class=\"tab_text");
      out.print(tab == 3 ? "_selected" : "");
      out.write("\">Logs");
      out.write("</a>\n                            ");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 4 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/reports.jsp\" class=\"tab_text");
      out.print(tab == 4 ? "_selected" : "");
      out.write("\">Reports");
      out.write("</a>\n                            ");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 5 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/setup.jsp\" class=\"tab_text");
      out.print(tab == 5 ? "_selected" : "");
      out.write("\">Setup");
      out.write("</a>\n                            ");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab_seperator\">&nbsp;");
      out.write("</td>\n                            ");
      out.write("<td class=\"tab");
      out.print(tab == 6 ? "_selected" : "");
      out.write("\">\n                                ");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/help.jsp\" class=\"tab_text");
      out.print(tab == 6 ? "_selected" : "");
      out.write("\">Help");
      out.write("</a>\n                             ");
      out.write("</td>\n                            ");
      out.write("<td width=\"100%\">\n                            ");
      out.write("</td>\n                        ");
      out.write("</tr>\n                    ");
      out.write("</table>\n                ");
      out.write("</td>\n            ");
      out.write("</tr>\n            ");
      out.write("<tr>\n                ");
      out.write("<td bgcolor=\"#0000FF\" height=\"1\" colspan=\"4\">");
      out.write("</td>\n            ");
      out.write("</tr>\n         ");
      out.write("</table>\n                    ");
      out.write("<!-- MAIN BODY -->\n");
      out.write("\n\n");
      out.write("<div class=\"margined\">\n    ");
      out.write("<h1>Heritrix online help");
      out.write("</h1>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/about.jsp\">About Heritrix");
      out.write("</a>");
      out.write("</b>");
      out.write("</br>\n    Includes license and current environment information.\n");
      out.write("</p>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write("<a target=\"_blank\" \n    href=\"");
      out.print(request.getContextPath());
      out.write("/docs/articles/user_manual/index.html\">User\n        Manual");
      out.write("</a>");
      out.write("</b>");
      out.write(
          "<br> Covers creating, configuring, launching,\n        monitoring and analysing crawl jobs. For all users.\n");
      out.write("</p>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write("<a target=\"_blank\" \n        href=\"");
      out.print(request.getContextPath());
      out.write("/docs/articles/developer_manual/index.html\">Developer Manual");
      out.write("</a>");
      out.write("</b>");
      out.write(
          "<br> Covers how to write add on modules for Heritrix\n        and provides in depth coverage of Heritrix's architecture. For\n        advanced users.\n");
      out.write("</p>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write("<a target=\"_blank\" \n        href=\"");
      out.print(request.getContextPath());
      out.write("/docs/articles/releasenotes/index.html\">Release Notes");
      out.write("</a>");
      out.write("</b>");
      out.write("<br>\n");
      out.write("</p>\n");
      out.write("<p>\n\t");
      out.write("<b>");
      out.write(
          "<a href=\"http://crawler.archive.org/issue-tracking.html\" target=\"_blank\">Issue Tracking");
      out.write("</a>");
      out.write("</b>");
      out.write(
          "<br />\n\tIf you have found a bug or would like to see new features in Heritrix, check the following links:\n\t");
      out.write("<ul>\n\t\t");
      out.write("<li>");
      out.write(
          "<a href=\"http://sourceforge.net/tracker/?atid=539099&amp;group_id=73833&amp;func=browse\" target=\"_blank\">Bugs");
      out.write("</a>");
      out.write("</li>\n\t\t");
      out.write("<li>");
      out.write(
          "<a href=\"http://sourceforge.net/tracker/?atid=539102&amp;group_id=73833&amp;func=browse\" target=\"_blank\">Feature Requests");
      out.write("</a>");
      out.write("</li>\n\t");
      out.write("</ul>\n");
      out.write("</p>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write(
          "<a href=\"http://crawler.archive.org/mail-lists.html\" target=\"_blank\">Mailing Lists");
      out.write("</a>");
      out.write("</b>");
      out.write("<br />\n    For general discussion on Heritrix, use our ");
      out.write(
          "<a href=\"http://groups.yahoo.com/group/archive-crawler/\" target=\"_blank\">Crawler Discussion List");
      out.write("</a>.\n");
      out.write("</p>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/help/regexpr.jsp\">Regular Expressions");
      out.write("</a>");
      out.write("</b>");
      out.write(
          "<br />\n    Information about the regular expressions used in Heritrix and a tool to double check that your regular expressions are valid and that they correctly identify the desired strings.\n");
      out.write("</p>\n");
      out.write("<p>\n    ");
      out.write("<b>");
      out.write("<a href=\"");
      out.print(request.getContextPath());
      out.write("/help/codes.jsp\">URI Fetch Status Codes");
      out.write("</a>");
      out.write("</b>");
      out.write(
          "<br />\n    This reference details what each of the fetch status codes assigned to URIs means.\n");
      out.write("</p>\n");
      out.write("<hr />\n");
      out.write("<font size=\"-1\">Heritrix version @VERSION@");
      out.write("</font>\n");
      out.write("</div>\n");

      /**
       * An include file that handles the "look" and navigation of a web page. Wrapps up things
       * begun in the "head.jsp" include file. See it for more details.
       *
       * @author Kristinn Sigurdsson
       */
      out.write("\n");
      out.write("<br/>\n");
      out.write("<br/>\n        ");
      out.write(
          "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n            ");
      out.write("<tr>\n            ");
      out.write("<td bgcolor=\"#0000FF\" height=\"1\" colspan=\"4\">");
      out.write("</td>\n            ");
      out.write("</tr>\n            ");
      out.write("<tr>\n            ");
      out.write("<td class=\"instance_name\">Identifier: ");
      out.print(currentHeritrixName);
      out.write("</td>\n            ");
      out.write("</tr>\n        ");
      out.write("</table>\n                    ");
      out.write("<!-- END MAIN BODY -->\n    ");
      out.write("</body>\n");
      out.write("</html>");
      out.write("\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
Example #10
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;
    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="/gmc/integrate.jsp";from=(0,147);to=(1,0)]
      out.write("\r\n");

      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(1,57);to=(2,0)]
      out.write("\r\n");

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

      // end
      // begin [file="/gmc/integrate.jsp";from=(3,0);to=(3,43)]
      /* ----  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("havelogin");
      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="/gmc/integrate.jsp";from=(3,0);to=(3,43)]
          } 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="/gmc/integrate.jsp";from=(3,43);to=(10,0)]
      out.write(
          "\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\">\r\n<title>GM频道处理</title>\r\n<link href=\"../css/public.css\" rel=\"stylesheet\" type=\"text/css\">\r\n<script language=\"JavaScript\" src=\"../js/public.js\"></script>\r\n");

      // end
      // begin [file="/gmc/integrate.jsp";from=(10,2);to=(15,0)]

      response.addHeader("Pragma", "no-cache");
      response.addHeader("Cache-Control", "no-cache");
      response.addDateHeader("Expires", -1);
      UserInfo userinfo = (UserInfo) session.getAttribute("userinfo");
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(15,2);to=(17,13)]
      out.write("\r\n<script language=\"Javascript\">\r\nvar AbsPath=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(17,16);to=(17,40)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(17,42);to=(220,48)]
      out.write(
          "\";\r\n\r\n//取得系统当前日期\r\n\r\nfunction CheckEnter()\r\n{\r\n\tif(event.ctrlKey && window.event.keyCode==10){\r\n\t\t onAnswer();\r\n\t}\r\n}\r\n\r\nfunction SetSubmitData()\r\n{\r\n\t\tfrmSubmit.document.all(\"questionid\").value=document.all(\"questionid\").value;\r\n\t\tfrmSubmit.document.all(\"quiztime\").value=document.all(\"quiztime\").value;\r\n\t\tfrmSubmit.document.all(\"gateway\").value=document.all(\"selGateway\").options[document.all(\"selGateway\").selectedIndex].value;\r\n\t\tfrmSubmit.document.all(\"game_id\").value=document.all(\"game_id\").value;\r\n\t\tfrmSubmit.document.all(\"area\").value=document.all(\"area\").value;\r\n\t\tfrmSubmit.document.all(\"group\").value=document.all(\"group\").value;\r\n\t\tfrmSubmit.document.all(\"account\").value=document.all(\"account\").value;\r\n\t\tfrmSubmit.document.all(\"role\").value=document.all(\"role\").value;\r\n\t\tfrmSubmit.document.all(\"question\").value=document.all(\"question\").value;\r\n\t\tfrmSubmit.document.all(\"answer\").value=document.all(\"answer\").value;\r\n\t\tfrmSubmit.document.all(\"usercode\").value=document.all(\"usercode\").value;\r\n\t\tfrmSubmit.document.all(\"term\").value=document.all(\"term\").value;\r\n\t\tfrmSubmit.document.all(\"allquestion\").value=document.all(\"allquestion\").checked?\"1\":\"0\";\r\n\t\tfrmSubmit.document.all(\"message\").value=document.all(\"answer\").value;\r\n}\r\n\r\n/***********************************************\r\n答复问题\r\n***********************************************/\r\n\r\nfunction onAnswer()\r\n{\r\n\t\tvar strErr=\"\";\r\n\t\tif(IsEmpty(\"answer\"))\r\n\t\t{\r\n\t\t\tstrErr+=\"答复内容不能为空!\\n\";\r\n\t\t}\r\n\t\telse if(document.all(\"answer\").value.length>106)\tstrErr+=\"答复内容已超过106个字符(53个汉字),请缩短答复内容后再试!\\n\";\r\n\t\tif(strErr!=\"\")\r\n\t\t{\r\n\t\t\talert(strErr);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"action\").value=\"answerquestion\";\r\n\t\t\tfrmSubmit.document.all(\"frmSubmit\").submit();\r\n\t\t\tfrmPlayerList.objOption.answer=document.all(\"answer\").value;\r\n\t\t\tSetQuestionState();\r\n\t\t}\r\n}\r\n\r\n/***********************************************\r\n删除问题\r\n***********************************************/\r\nfunction onDelete()\r\n{\r\n\t\tSetSubmitData();\r\n\t\tfrmSubmit.document.all(\"action\").value=\"deletequestion\";\r\n\t\tfrmSubmit.document.all(\"frmSubmit\").submit();\r\n\t\tfrmPlayerList.objOption.answer=\"此问题已删除!\";\r\n\t\tSetQuestionState();\r\n}\r\n\r\nfunction SetQuestionState()\r\n{\r\n\t\tfrmPlayerList.document.all(\"selPlayerList\").focus();\r\n\t\tfrmSubmit.src=AbsPath+\"/submit.jsp\";\r\n\t\tfrmPlayerList.objOption.className=\"haveanswer\";\r\n\t\tfrmPlayerList.intHaveAnswer++;\r\n\t\tdocument.all(\"lblHaveAnswer\").innerText=frmPlayerList.intHaveAnswer;\r\n\t\tdocument.all(\"answer\").disabled=true;\r\n\t\tdocument.all(\"selQuickanswer\").disabled=true;\r\n\t\tdocument.all(\"btnAnswer\").disabled=true;\r\n\t\tdocument.all(\"btnDelete\").disabled=true;\r\n\t\tif(frmPlayerList.intHaveAnswer!=frmPlayerList.intQuestion)\r\n\t\t{\r\n\t\t\tvar objSelPlayList=frmPlayerList.document.all(\"selPlayerList\");//玩家列表\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t \tfrmPlayerList.intCurrent++;\r\n\t\t\t\tif(frmPlayerList.intCurrent==frmPlayerList.intQuestion) frmPlayerList.intCurrent=0;\r\n\t\t\t}while(objSelPlayList.options[frmPlayerList.intCurrent].className==\"haveanswer\")\r\n\t\t\tobjSelPlayList.selectedIndex =frmPlayerList.intCurrent;\r\n\t\t\tfrmPlayerList.onSelectPlayer();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tReloadPlayerList();\r\n\t\t}\r\n\t\tif(document.all(\"allquestion\").checked){\r\n\t\t\tReloadPlayerList();\r\n\t\t}\r\n\t\tdocument.all(\"allquestion\").checked=false;\r\n}\r\n\r\n/***********************************************\r\n刷新问题列表\r\n***********************************************/\r\nfunction ReloadPlayerList()\r\n{\r\n\tdocument.all(\"allquestion\").checked=false;\r\n\tfrmPlayerList.window.location.reload();\r\n}\r\n\r\n/***********************************************\r\n选择快速答复列表\r\n***********************************************/\r\nfunction onQuickanswer()\r\n{\r\n\tdocument.all(\"answer\").value=document.all(\"selQuickanswer\").value\r\n}\r\n\r\nfunction answerlog(){\r\n\twindow.open(AbsPath+\"/search/answerlog.jsp\",\"_blank\");\r\n}\r\n/**********************************\r\n执行GM操作\r\n***********************************/\r\nfunction onGMFunction()\r\n{\r\n\tvar objSel=document.all(\"selGMFunction\");\r\n\tvar strErr=\"\";\r\n\tif(objSel.value==\"\")\r\n\t{\r\n\t\tstrErr+=\"*请先选择GM操作\\n\";\r\n\t}\r\n\tif(IsEmpty(\"account\")&&IsEmpty(\"role\"))\r\n\t{\r\n\t\tstrErr+=\"*玩家帐号和角色不能同时为空\\n\";\r\n\t}\r\n\tif(strErr!=\"\")\r\n\t{\r\n\t\talert(strErr);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tSetSubmitData();\r\n\t\tfrmSubmit.document.all(\"action\").value=\"quickgmfunction\";\r\n\t\tif(objSel.value==\"踢号\")\r\n\t\t{\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"卡号\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"kickaccount\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"踢人\")\r\n\t\t{\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"卡号\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"kickrole\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"禁言\")\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"乱发言\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"forbidsay\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"冻结帐号\")\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"违规\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"A_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"freeze\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"解除禁言\")\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"改正以前违规行为\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"permitsay\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"解冻帐号\")\r\n\t\t{\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"改正以前违规行为\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"A_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"unfreeze\";\r\n\t\t}\r\n\t\tfrmSubmit.document.all(\"frmSubmit\").submit();\r\n\t\tdocument.all(\"allquestion\").checked=false;\r\n\t}\r\n}\r\n\tfunction setQuestionType(iid){\r\n\t\tvar objSelTemp = document.all(\"selQuestionTypeTemp\");\t\t\r\n\t\tvar objOption;\r\n\t\tdocument.all(\"typeDiv\").innerHTML = \"<button name=all onclick=changeQuestionType('0','all')>全部</button>\";\r\n\t\t\r\n\t\tvar i=0;\r\n\t\tfor(i=0;i<objSelTemp.length;i++){\r\n\t\t\tobjOption=objSelTemp.options[i];\r\n\t\t\tif(objOption.fid==0){\r\n\t\t\t\tdocument.all(\"typeDiv\").innerHTML += \"&nbsp;&nbsp;<button name=\"+objOption.value+\" onclick=changeQuestionType('\"+objOption.iid+\"','\"+objOption.value+\"')>\"+objOption.text+\"</button>\";\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\tvar preClickType = \"\";\r\n\tfunction changeQuestionType(iid,type){\r\n\t\tdocument.getElementById(\"frmPlayerList\").src=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(220,51);to=(220,75)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(220,77);to=(263,31)]
      out.write(
          "/GMCServlet?action=playerlist&type=\"+type+\"&iid=\"+iid;\r\n\t\t//ReloadPlayerList();\r\n\t\r\n\t\twindow.open(document.all.frmPlayerList.src,'frmPlayerList','');\r\n\t\t\r\n\t\tdocument.all(\"subTypeTd\").style.display = \"none\";\r\n\t\tvar objSel=document.all(\"subType\");\r\n\t\tvar objSelTemp=document.all(\"selQuestionTypeTemp\");\r\n\t\tvar objOption;\r\n\t\tobjSel.length=0;\r\n\t\tvar i=0;\r\n\t\tvar channel = \"全部\";\r\n\t\tfrmSubmit.document.all(\"channel\").value=channel;\r\n\t\t\r\n\t\tif(preClickType!=\"\"){\r\n\t\t\t\tdocument.getElementById(preClickType).className =\"\";\r\n\t\t}\r\n\t\tdocument.getElementById(type).className =\"ClickBUTTON\";\r\n\t\tpreClickType = type;\t\r\n\t\t\t\t\t\r\n\t\tif(iid == 0){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(i=0;i<objSelTemp.length;i++){\r\n\t\t\tobjOption=objSelTemp.options[i];\r\n\t\t\t\r\n\t\t\tif(objOption.iid==iid){\t\t\r\n\t\t\t\tchannel = objOption.text;\r\n\t\t\t\tfrmSubmit.document.all(\"channel\").value=channel;\r\n\t\t\t}\t\t\r\n\t\t\tif(objOption.fid==iid){\r\n\t\t\t\tobjSel.options[objSel.length]=new Option(objOption.text,objOption.value);\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\tif(objSel.length>0){\r\n\t\t\tdocument.all(\"subTypeTd\").style.display = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n</script>\r\n</head>\r\n<body onload=\"setQuestionType('");

      // end
      // begin [file="/gmc/integrate.jsp";from=(263,34);to=(263,82)]
      out.print(Util.setNullToNull(request.getParameter("iid")));
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(263,84);to=(281,104)]
      out.write(
          "')\">\r\n<table width=\"100%\" height=\"100%\" border=\"0\" align=\"center\" cellspacing=\"0\">\r\n  <tr>\r\n    <td height=\"20\" bgcolor=\"#BBDDFD\">&nbsp;&nbsp;当前位置:<span class=\"title\">服务功能</span> &gt;&gt; <span class=\"title\">GM频道处理(基于GCD新协议)</span></td>\r\n  </tr>\r\n  <tr>\r\n    <td align=\"center\" valign=\"top\">\r\n      <table width=\"100%\" border=\"1\" cellspacing=\"0\" bordercolor=\"#000000\" class=\"tablelist\">\r\n        <tbody>\r\n          <tr align=\"center\" height=\"50\">\r\n            <td background=\"../images/tab_bg.gif\"><div id=\"typeDiv\"></div><font color=\"#FFFFFF\">玩家问题列表(问题总数:</font><font color=\"#FF0000\">\r\n              <label id=\"lblNumber\">0</label>\r\n            </font><font color=\"#FFFFFF\">,已处理:</font><font color=\"#FF0000\">\r\n            <label id=\"lblHaveAnswer\">0</label>\r\n            </font>)</td>\r\n          </tr>\r\n          <tr align=\"center\">\r\n            <td height=\"380\">\r\n              <iframe name=\"frmPlayerList\" width=\"100%\" height=\"100%\" frameborder=0 scrolling=\"no\" src=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(281,107);to=(281,131)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(281,133);to=(294,33)]
      out.write(
          "/GMCServlet?action=playerlist&type=all&iid=0\" marginwidth=\"0\" marginheight=\"0\">\r\n              对不起,你的浏览器不支持嵌入式框架。请升级到更高的版本。 </iframe>\r\n\t\t\t</td>\r\n          </tr>\r\n          <tr align=\"center\">\r\n            <td background=\"../images/tab_bg.gif\"><font color=\"#FFFFFF\">问题详情</font></td>\r\n          </tr>\r\n          <tr>\r\n            <td valign=\"top\">\r\n              <table width=\"100%\" border=\"0\" cellspacing=\"0\">\r\n                <tr>\r\n                  <td nowrap>玩家帐号<input type=\"text\" name=\"account\" value=\"\" size=\"15\"></td>\r\n                  <td nowrap>玩家角色<input type=\"text\" name=\"role\" value=\"\" size=\"15\"></td>\r\n                  <td nowrap>所属区服");

      // end
      // begin [file="/gmc/integrate.jsp";from=(294,33);to=(294,121)]
      /* ----  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_gateway_person");
      _jspx_th_display_display_0.setProperty("selGateway");
      _jspx_th_display_display_0.setParameter("");
      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="/gmc/integrate.jsp";from=(294,121);to=(294,131)]
            out.write("          ");

            // end
            // begin [file="/gmc/integrate.jsp";from=(294,131);to=(294,149)]
          } 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="/gmc/integrate.jsp";from=(294,149);to=(298,62)]
      out.write(
          "\r\n\t\t\t\t  <input type=\"hidden\" name=\"game_id\">\r\n                  <input type=\"hidden\" name=\"area\">\r\n                  <input type=\"hidden\" name=\"group\"></td>\r\n                  <input type=\"hidden\" name=\"usercode\" value=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(298,65);to=(298,87)]
      out.print(userinfo.getUsercode());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(298,89);to=(318,139)]
      out.write(
          "\">\r\n                  <input type=\"hidden\" name=\"questionid\"></td>\r\n                  <td nowrap id=\"subTypeTd\" style=\"display:none\">类型<select name=\"subType\"></select></td>\r\n                  <td nowrap>提问日期<input type=\"text\" name=\"quiztime\" value=\"\" readonly=\"true\"></td>\r\n                </tr>\r\n                <tr>\r\n                  <td colspan=\"6\"><textarea name=\"question\" style=\"width:100%\" rows=\"2\" readonly onMouseOver=\"this.focus()\" ></textarea></td>\r\n                </tr>\r\n              </table>\r\n            </td>\r\n          </tr>\r\n          <tr>\r\n            <td align=\"center\" background=\"../images/tab_bg.gif\"><font color=\"#FFFFFF\">答复内容</font></td>\r\n          </tr>\r\n          <tr>\r\n            <td>\r\n              <textarea name=\"answer\" style=\"width:100%\" rows=\"2\" disabled onKeyPress=\"CheckEnter()\"></textarea>\r\n            </td>\r\n          </tr>\r\n          <tr>\r\n            <td nowrap>快速答复<SELECT name='selQuickanswer'  onclick='onQuickanswer()' style='width:90%'  onmouseover='this.focus()'></SELECT>");

      // end
      // begin [file="/gmc/integrate.jsp";from=(318,139);to=(318,219)]
      /* ----  display:display ---- */
      com.kingsoft.gmsystem.web.taglib.UserTag _jspx_th_display_display_1 =
          new com.kingsoft.gmsystem.web.taglib.UserTag();
      _jspx_th_display_display_1.setPageContext(pageContext);
      _jspx_th_display_display_1.setParent(null);
      _jspx_th_display_display_1.setDisplayCode("select_quickanswer");
      _jspx_th_display_display_1.setProperty("selQuickanswerTemp");
      try {
        int _jspx_eval_display_display_1 = _jspx_th_display_display_1.doStartTag();
        if (_jspx_eval_display_display_1 == 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_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            // end
            // HTML // begin [file="/gmc/integrate.jsp";from=(318,219);to=(319,12)]
            out.write("\r\n            ");

            // end
            // begin [file="/gmc/integrate.jsp";from=(319,12);to=(319,30)]
          } while (_jspx_th_display_display_1.doAfterBody()
              == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
        }
        if (_jspx_th_display_display_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } finally {
        _jspx_th_display_display_1.release();
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(319,30);to=(333,5)]
      out.write(
          "\r\n\t\t\t</td>\r\n          </tr>\r\n          <tr>\r\n            <td align=\"right\" nowrap>\r\n              <table width=\"700\" border=\"0\" cellspacing=\"0\">\r\n                <tr align=\"center\">\r\n                  <td><input type=\"checkbox\" name=\"allquestion\">\r\n                  对此玩家所有问题操作</td>\r\n                  <td><button name=\"btnAnswer\" style=\"width:80\" onClick=\"onAnswer()\" disabled>答复问题</button></td>\r\n                  <td><button name=\"btnDelete\" style=\"width:80\"  onClick=\"onDelete()\" disabled>删除问题</button></td>\r\n                  <td><button name=\"btnFresh\" style=\"width:80\"  onClick=\"ReloadPlayerList()\">刷新问题列表</button><button name=\"btnanswerlog\" style=\"width:80\"  onClick=\"answerlog()\">答复记录</button></td>\r\n                  <td>GM操作<select name=\"selGMFunction\">\r\n\t\t\t\t\t<option value=\"\">=请选择=</option>\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(333,7);to=(333,63)]
      if (userinfo.getUserpower().indexOf("kickplayer") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(333,65);to=(333,97)]
        out.write(" <option value=\"踢号\">踢号</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(333,99);to=(333,100)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(333,102);to=(334,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(334,7);to=(334,63)]
      if (userinfo.getUserpower().indexOf("kickplayer") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(334,65);to=(334,97)]
        out.write(" <option value=\"踢人\">踢人</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(334,99);to=(334,100)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(334,102);to=(335,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(335,7);to=(335,63)]
      if (userinfo.getUserpower().indexOf("rolebehave") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(335,65);to=(335,97)]
        out.write(" <option value=\"禁言\">禁言</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(335,99);to=(335,100)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(335,102);to=(336,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(336,7);to=(336,65)]
      if (userinfo.getUserpower().indexOf("accountnctrl") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(336,67);to=(336,103)]
        out.write(" <option value=\"冻结帐号\">冻结帐号</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(336,105);to=(336,106)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(336,108);to=(337,6)]
      out.write("\r\n\t\t\t\t\t ");

      // end
      // begin [file="/gmc/integrate.jsp";from=(337,8);to=(337,63)]
      if (userinfo.getUserpower().indexOf("rolebehave") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(337,65);to=(337,101)]
        out.write(" <option value=\"解除禁言\">解除禁言</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(337,103);to=(337,104)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(337,106);to=(338,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(338,7);to=(338,65)]
      if (userinfo.getUserpower().indexOf("accountnctrl") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(338,67);to=(338,103)]
        out.write(" <option value=\"解冻帐号\">解冻帐号</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(338,105);to=(338,106)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(338,108);to=(358,18)]
      out.write(
          "\r\n                  </select>期限<select name=\"term\">\r\n              <option value=\"0\" selected>无限</option>\r\n              <option value=\"1\">1</option>\r\n              <option value=\"2\">2</option>\r\n              <option value=\"3\">3</option>\r\n              <option value=\"4\">4</option>\r\n              <option value=\"5\">5</option>\r\n              <option value=\"6\">6</option>\r\n              <option value=\"7\">7</option>\r\n              <option value=\"10\">10</option>\r\n              <option value=\"15\">15</option>\r\n              <option value=\"20\">20</option>\r\n              <option value=\"25\">25</option>\r\n              <option value=\"30\">30</option>\r\n              <option value=\"35\">35</option>\r\n              <option value=\"40\">40</option>\r\n              <option value=\"50\">50</option>\r\n              <option value=\"60\">60</option>                  </select>天\r\n                  <button onclick=\"onGMFunction()\">确定</button></td>\r\n                  ");

      // end
      // begin [file="/gmc/integrate.jsp";from=(358,18);to=(358,125)]
      /* ----  display:display ---- */
      com.kingsoft.gmsystem.web.taglib.UserTag _jspx_th_display_display_2 =
          new com.kingsoft.gmsystem.web.taglib.UserTag();
      _jspx_th_display_display_2.setPageContext(pageContext);
      _jspx_th_display_display_2.setParent(null);
      _jspx_th_display_display_2.setDisplayCode("select_questiontype");
      _jspx_th_display_display_2.setProperty("selQuestionTypeTemp");
      _jspx_th_display_display_2.setParameter("display:none");
      try {
        int _jspx_eval_display_display_2 = _jspx_th_display_display_2.doStartTag();
        if (_jspx_eval_display_display_2 == 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");
        // end
        // begin [file="/gmc/integrate.jsp";from=(358,18);to=(358,143)]
        if (_jspx_th_display_display_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } finally {
        _jspx_th_display_display_2.release();
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(358,143);to=(376,0)]
      out.write(
          "\r\n                </tr>\r\n              </table>\r\n\t\t\t</td>\r\n          </tr>\r\n        </tbody>\r\n      </table>\r\n      <iframe name=\"frmSubmit\" width=\"100%\" height=\"0\" frameborder=0 scrolling=\"auto\" src=\"submit.jsp\" marginwidth=\"0\" marginheight=\"0\">\r\n      对不起,你的浏览器不支持嵌入式框架。请升级到更高的版本。 </iframe>\r\n\r\n\t</td>\r\n  </tr>\r\n  <tr>\r\n    <td height=\"16\" align=\"center\" bgcolor=\"#BBDDFD\">Copyright &copy; 2005 Kingsoft Corp,All Rights Reserved</td>\r\n  </tr>\r\n</table>\r\n</body>\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);
    }
  }
Example #11
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);
    }
  }
Example #12
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext =
          _jspxFactory.getPageContext(this, request, response, "/error.jsp", true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      /** This include page ensures that the handler exists and is ready to be accessed. */
      CrawlJobHandler handler = (CrawlJobHandler) application.getAttribute("handler");
      Heritrix heritrix = (Heritrix) application.getAttribute("heritrix");

      // If handler is empty then this is the first time this bit of code is
      // being run since the server came online. In that case get or create the
      // handler.
      if (handler == null) {
        if (Heritrix.isSingleInstance()) {
          heritrix = Heritrix.getSingleInstance();
          handler = heritrix.getJobHandler();
          application.setAttribute("heritrix", heritrix);
          application.setAttribute("handler", handler);
        } else {
          // TODO:
          // If we get here, then there are multiple heritrix instances
          // and we have to put up a screen allowing the user choose between.
          // Otherwise, there is no Heritrix instance.  Thats a problem.
          throw new RuntimeException(
              "No heritrix instance (or multiple "
                  + "to choose from and we haven't implemented this yet)");
        }
      }

      // ensure controller's settingsHandler is always thread-installed
      // in web ui threads
      if (handler != null) {
        CrawlJob job = handler.getCurrentJob();
        if (job != null) {
          CrawlController controller = job.getController();
          if (controller != null) {
            controller.installThreadContextSettingsHandler();
          }
        }
      }

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

      /** This webpage performs actions that can be performed from the console. */
      String sAction = request.getParameter("action");
      if (sAction != null) {
        // Need to handle an action
        if (sAction.equalsIgnoreCase("start")) {
          // Tell handler to start crawl job
          handler.startCrawler();
        } else if (sAction.equalsIgnoreCase("stop")) {
          // Tell handler to stop crawl job
          handler.stopCrawler();
        } else if (sAction.equalsIgnoreCase("terminate")) {
          // Delete current job
          if (handler.getCurrentJob() != null) {
            handler.deleteJob(handler.getCurrentJob().getUID());
          }
        } else if (sAction.equalsIgnoreCase("pause")) {
          // Tell handler to pause crawl job
          handler.pauseJob();
        } else if (sAction.equalsIgnoreCase("resume")) {
          // Tell handler to resume crawl job
          handler.resumeJob();
        } else if (sAction.equalsIgnoreCase("checkpoint")) {
          if (handler.getCurrentJob() != null) {
            handler.checkpointJob();
          }
        }
      }
      response.sendRedirect(request.getContextPath() + "/index.jsp");

      out.write("\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

      Vector vMibs = (Vector) request.getAttribute("mibs");

      String strIp = (String) request.getAttribute("ip");
      if (strIp == null) strIp = "";

      String strCommunity = (String) request.getAttribute("cs");
      if (strCommunity == null) strCommunity = "";

      String strPort = (String) request.getAttribute("port");
      if (strPort == null) strPort = "161";

      String strRetries = (String) request.getAttribute("retries");
      if (strRetries == null) strRetries = "1";

      String strTimeout = (String) request.getAttribute("timeout");
      if (strTimeout == null) strTimeout = "3000";

      String strOID = (String) request.getAttribute("oid");
      if (strOID == null) strOID = "";

      String strDesc = (String) request.getAttribute("desc");
      if (strDesc == null) strDesc = "";

      String strASN1 = (String) request.getAttribute("asn1");
      if (strASN1 == null) strASN1 = "";

      String authpass = (String) request.getAttribute("authpass");
      if (authpass == null) authpass = "";

      String privpass = (String) request.getAttribute("privpass");
      if (privpass == null) privpass = "";

      String version = (String) request.getAttribute("version");
      if (version == null) version = "version 1";

      String securityname = (String) request.getAttribute("securityname");
      if (securityname == null) securityname = "";

      String seclevel = (String) request.getAttribute("seclevel");
      if (seclevel == null) seclevel = "AUTH_PRIV";

      String authproto = (String) request.getAttribute("authproto");
      authproto = authproto == null ? "MD5" : authproto;

      String privproto = (String) request.getAttribute("privproto");
      privproto = privproto == null ? "DES" : privproto;

      out.write("\n\n\n");
      out.write("<html>\n");
      out.write("<head>\n  ");
      out.write("<title>WebTelemetry - Tools - SNMP Walk");
      out.write("</title>\n  ");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\n  ");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\n\n\n\t");
      out.write(
          "<script type=text/javascript>\n\t\n\t// Validate the SNMP form\n\tfunction validateForm()\n\t{\n\t    var seclevel = \"\";\n\t\tvar seclevelChecked = \"\";\n\t\tif (document.snmpwalk.ip.value == \"\" ) \n\t\t{\n\t\t    alert (\"Please fill in the ip address field.\");\n\t\t    return false;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif (!verifyIP(document.snmpwalk.ip.value))\n\t\t\t{\n\t\t\t\tdocument.snmpwalk.ip.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\n\t\tif (document.snmpwalk.port.value != \"\" ) \n\t\t{\n\t\t\tif (!checkInteger(trim(document.snmpwalk.port.value))) {\n\t            alert (\"Please enter a whole number for 'Port' and try again.\");\n\t            document.snmpwalk.port.focus();\n\t            return false;\n\t        }\n\t    }\n\t    \n\t    if (document.snmpwalk.retries.value != \"\" ) \n\t\t{\n\t\t\tif (!checkInteger(trim(document.snmpwalk.retries.value))) {\n\t            alert (\"Please enter a whole number for 'Retries' and try again.\");\n\t            document.snmpwalk.retries.focus();\n\t            return false;\n\t        }\n\t    }\n\t    \n\t    if (document.snmpwalk.timeout.value != \"\" ) \n\t\t{\n");
      out.write(
          "\t\t\tif (!checkInteger(trim(document.snmpwalk.timeout.value))) {\n\t            alert (\"Please enter a whole number for 'Timeout' and try again.\");\n\t            document.snmpwalk.timeout.focus();\n\t            return false;\n\t        }\n\t    }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tvar sel = document.getElementById( \"version\");\t\t\t\n\t\tvar opt = sel.options[ sel.selectedIndex];\t\n\t\t\n\t\tif( opt.text != \"version 3\")\n\t\t{\n\t\t\t// Community String\n\t\t\tvar cs = document.snmpwalk.cs.value;\n\t\t\tif (cs == \"\" || cs == null || trim(cs).length ");
      out.write(
          "<= 0)\n\t\t\t{\n\t\t    \talert (\"Please fill in the community string field.\");\n\t\t    \tdocument.snmpwalk.cs.focus();\n\t\t    \treturn false;\n\t\t    }\n\t\t}\n\t\telse\n        {\n            // Security name\n            var secname = document.getElementById( \"securityname\");  \n            if( secname.value == null || trim(secname.value).length == 0)\n            {\n                alert( \"Please enter a security name\");\n                secname.focus();\n                return false;\n            }\n\n            //Find Security level, pass checks\n\t\t\tfor (var i = 0; i ");
      out.write(
          "< document.snmpwalk.seclevel.length; i++)  \n\t\t\t{ \n\t\t\t\tseclevel = document.snmpwalk.seclevel[i].value;\n\t\t\t\tsecChecked = document.snmpwalk.seclevel[i].checked;\n\t\t\n\t\t\t\tif (secChecked){\n\t\t\t\t\tseclevelChecked = seclevel;\n\t\t\t\t}\n\t\n\t\t\t\tif ( (seclevel == \"AUTH_PRIV\") && (secChecked) )\n\t\t\t\t{\n\t\t\t\t\tif( !checkAuthPassFld() || !checkPrivPassFld())\n\t              \t{            \t\n\t               \t\treturn false;\n\t           \t\t}\t\n\t\t\t\t}\n\t\t\t\telse\n\t        \t{\n\t\t \t\t\tif( (seclevel == \"AUTH_NOPRIV\") && (secChecked && !checkAuthPassFld()) )\n\t\t         \t{                \t\n\t\t        \t\treturn false;\n\t\t     \t\t}\n\t\t   \t\t}    \n\t\t\t}   \n        }\n\t    \n\t\t// The following is needed to support Mozilla & IE browsers with retrieving values from drop-down boxes (version, authproto, privproto).\n\t\tvar versionSel = document.snmpwalk.version;\n\t\tvar versionVal = versionSel.options[ versionSel.selectedIndex].text;\t\n\t\tvar authprotoSel = document.snmpwalk.authproto;\n\t\tvar authprotoVal = authprotoSel.options[ authprotoSel.selectedIndex].text;\t\n\t\tvar privprotoSel = document.snmpwalk.privproto;\n");
      out.write(
          "\t\tvar privprotoVal = privprotoSel.options[ privprotoSel.selectedIndex].text;\n\t\t\n\t\t// The followings are needed to avoid passing inappropriate SNMP version-dependent browser saved values to the servlet. \n\t\tvar authpassVal = document.snmpwalk.authpass.value; \n\t\tvar privpassVal = document.snmpwalk.privpass.value; \n\t\tvar communityStr = document.snmpwalk.cs.value;\n\t\t\n\t\tif (versionVal == \"version 3\")\n\t\t{\n\t\t\tcommunityStr = \"\";\n\t\t\tif (seclevelChecked == \"AUTH_NOPRIV\")\n\t\t\t{\n\t\t\t\tprivpassVal = \"\";\n\t\t\t\tprivprotoVal = \"\"; \n\t\t\t}\n\t\t\telse if (seclevelChecked == \"NOAUTH_NOPRIV\")\n\t\t\t{\n\t\t\t\tauthpassVal = \"\";\n\t\t\t\tauthprotoVal = \"\";\n\t\t\t\tprivpassVal = \"\";\n\t\t\t\tprivprotoVal = \"\"; \n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tauthpassVal = \"\";\n\t\t\tauthprotoVal = \"\";\n\t\t\tprivpassVal = \"\";\n\t\t\tprivprotoVal = \"\"; \n\t\t}\n\t\t\n\t    top.frames[1].document.snmpwalk.ip.value=document.snmpwalk.ip.value;\t    \t\t\n\t    top.frames[1].document.snmpwalk.oid.value=document.snmpwalk.oid.value;\t\n\t    top.frames[1].document.snmpwalk.port.value=document.snmpwalk.port.value;\n\t    top.frames[1].document.snmpwalk.retries.value=document.snmpwalk.retries.value;\n");
      out.write(
          "\t    top.frames[1].document.snmpwalk.timeout.value=document.snmpwalk.timeout.value;\n\t    top.frames[1].document.snmpwalk.cs.value=communityStr;\t\t\n\t    top.frames[1].document.snmpwalk.version.value=versionVal;  \t\t\t\n\t    top.frames[1].document.snmpwalk.securityname.value=document.snmpwalk.securityname.value; \n\t    top.frames[1].document.snmpwalk.seclevel.value=seclevelChecked; \t\t\n\t    top.frames[1].document.snmpwalk.authpass.value=authpassVal; \t\n\t    top.frames[1].document.snmpwalk.authproto.value=authprotoVal; \t\n\t    top.frames[1].document.snmpwalk.privpass.value=privpassVal; \t\n\t    top.frames[1].document.snmpwalk.privproto.value=privprotoVal;    \n\t    top.frames[1].document.snmpwalk.button.value='GetResults';\n\t    top.frames[1].document.snmpwalk.submit();\n\t    \n\t    return true;   \n\t}\n\n\t// Validate ASN.1 value\n\tfunction validateLookup()\n\t{\n\t    if (document.snmpwalk.desc.value == \"\" ) \n\t\t{\n\t\t    alert (\"Please fill in ASN.1 Description (example: hrStorageDescr).\");\n\t\t    return false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n");
      out.write(
          "\t}\n\t\n\t// Show MIB pop-up window\n\tfunction viewMIB()\n\t{\n\t    if (document.snmpwalk.mibs.selectedIndex == -1 ) \n\t\t{\n\t\t    alert (\"Please select a MIB to view.\");\n\t\t}\n\t\tvar mib = document.snmpwalk.mibs.options[document.snmpwalk.mibs.selectedIndex];\n\t    var win = window.open('");
      out.print(WTTools.getMibURL(request));
      out.write(
          "' + mib.text, '', \n\t\t\t'status=yes,resizeable=yes,scrollbars=yes,menubar=yes,height=600,width=800');\t\n\t    return false;\n\t}\n\t\n\t// hide element\n    function hide( targetId)\n    {\n        if (document.getElementById)\n        {\n            target = document.getElementById(targetId);\n            target.style.visibility = \"hidden\";\n            target.style.display = \"none\";\n        }\n    }\n    // show element\n    function show( targetId)\n    {\n        if (document.getElementById)\n        {\n            target = document.getElementById(targetId);\n            target.style.visibility = \"visible\";\n            target.style.display = \"\";\n        }\n    }\n    \n    // Adjust frame\n    function adjustFrames(topFrameSize)\n    {\n    \tvar framesSize = topFrameSize + \",*\";\n    \tparent.document.getElementById(\"snmpframes\").rows = framesSize;   \n    }\n\n\t\n\t// Check for SNMPv3 selection\n\tfunction checkForSNMPv3()\n\t{\n\t\tvar sel = document.getElementById( \"version\");\n\t\tvar opt = sel.options[ sel.selectedIndex];\n\t\tif( opt.text == \"version 3\")\n");
      out.write(
          "\t\t{\t\t\t\n\t\t\thide (\"csOptions\");\n\t\t\tshow (\"snmpOptions\"); \n\t\t\tadjustFrames(420);\n\t\t\tcheckSecLevel();\t\t\t\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\tshow (\"csOptions\");\n\t\t\thide (\"snmpOptions\"); \n\t\t\thide (\"authOptions\");   \n\t\t\thide (\"privOptions\");   \n\t\t\tadjustFrames(270);\n\t\t}\n\n\t\t// This is work around for IE browsers which do not support ");
      out.write(
          "<option disabled>\n\t\t// This text will not appear for any other browsers as this option can never be selected \n\t\tif(( opt.text == \"SNMPv3 disabled\") || ( opt.text == \"SNMPv3 expired\"))\n\t\t{\n\t\t\talert(\"You are currently not licensed to use this feature.  Please contact your sales representative for questions regarding this feature.\");\n\n\t\t\t// When the user selects SNMP v3 feature, select index is changed to version 1\n\t\t\tsel.selectedIndex = sel.options[sel.selectedIndex];\n\t\t}\n\t}\n\t\n\t// Check Auth Passphrase\n\tfunction checkAuthPassFld()\n    {\n        var authpass = document.getElementById( \"authpassfld\");\n        if( authpass.value == null || authpass.value.length ");
      out.write(
          "< 8)\n        {\n            alert( \"Authentication Passphrase must be 8 characters or more\");\n            authpass.focus();\n            return false;\n        }\n\n        return true;\n    }\n    \n    // Check Privacy Passphrase\n    function checkPrivPassFld()\n    {\n        var privpass = document.getElementById( \"privpassfld\");\n        if( privpass.value == null || privpass.value.length ");
      out.write(
          "< 8)\n        {\n            alert( \"Privacy Passphrase must be 8 characters or more\");\n            privpass.focus();\n            return false;\n        }\n\n        return true;\n    }\n    \n    function checkSecLevel()\n    { \n    \tvar secLevelChecked;   \t\n    \tfor (var i = 0; i ");
      out.write(
          "< document.snmpwalk.seclevel.length; i++)  \n\t\t{ \n\t\t\tvar seclevel = document.snmpwalk.seclevel[i].value;\n\t\t\tvar secChecked = document.snmpwalk.seclevel[i].checked;\n\t\t\tif ( secChecked )\n\t\t\t{\n\t\t\t\tsecLevelChecked = seclevel;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif ( secLevelChecked == \"AUTH_PRIV\" )\n\t\t{\n\t\t\tif( checkAuthPassFld() || checkPrivPassFld())\n         \t{\n\t\t\t\tshowAuthPriv();\t\n\t\t\t}\n\t\t}\n\t\telse \n    \t{\t    \t\t\n\t  \t\tif ( (secLevelChecked == \"AUTH_NOPRIV\") && checkAuthPassFld() )\n\t    \t{\n\t     \t\tshowAuth();\n\t  \t\t}\n\t  \t\telse \n\t    \t{\n\t    \t\thideAuthPriv();\n\t    \t}\n   \t\t} \n    }\n    \n \n\tfunction showAuthPriv()\n\t{\n\t\tshow( \"authOptions\");\n\t\tshow( \"privOptions\");\n\t}\n\t    \n\t\n\tfunction showAuth()\n\t{\n\t\tshow( \"authOptions\");\n\t\thide( \"privOptions\");\n\t}\n\t    \n\t\n\tfunction hideAuthPriv()\n\t{\n\t\thide( \"authOptions\");\n\t \thide( \"privOptions\");\n\t}\n\t\n\tfunction checkForSpaces( evt)\n    {\n        evt = (evt) ? evt : ((window.event) ? event : null);\n        if( evt)\n        {\n            var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);\n");
      out.write(
          "            if( elem)\n            {\n                var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);\n                return( charCode != 32);\n            }\n        }\n    }\n\n\t");
      out.write("</script>\n");
      out.write("</head>\n\n\n");
      out.write("<body onload='checkForSNMPv3()'>\n");
      /* ----  c:import ---- */
      org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 =
          (org.apache.taglibs.standard.tag.el.core.ImportTag)
              _jspx_tagPool_c_import_url_context.get(
                  org.apache.taglibs.standard.tag.el.core.ImportTag.class);
      _jspx_th_c_import_0.setPageContext(pageContext);
      _jspx_th_c_import_0.setParent(null);
      _jspx_th_c_import_0.setContext("/wt-monitor");
      _jspx_th_c_import_0.setUrl("/includes/header.jsp");
      int[] _jspx_push_body_count_c_import_0 = new int[] {0};
      try {
        int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag();
        if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
            javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
            _jspx_push_body_count_c_import_0[0]++;
            out = _bc;
            _jspx_th_c_import_0.setBodyContent(_bc);
            _jspx_th_c_import_0.doInitBody();
          }
          do {
            out.write("\n\t");
            if (_jspx_meth_c_param_0(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n\t");
            if (_jspx_meth_c_param_1(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n\t");
            if (_jspx_meth_c_param_2(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n\t");
            if (_jspx_meth_c_param_3(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\n");
            int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody();
            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
          } while (true);
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
            out = pageContext.popBody();
          _jspx_push_body_count_c_import_0[0]--;
        }
        if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody();
        _jspx_th_c_import_0.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_import_0.doFinally();
        _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0);
      }
      out.write("\n\n");
      out.write("<!-- BEGIN FRAMING TABLE:open tags, keep at 100%-->\n");
      out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t");
      out.write("<tr valign=\"top\">\n\t\t");
      out.write("<td valign=\"top\" width=\"10\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n\t\t");
      out.write("<td>\n");
      out.write("<!-- END FRAMING TABLE:open tags, keep at 100%-->\n\n");
      out.write("<form action=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpWalkServlet\" method=\"get\" name=\"snmpwalk\" autocomplete=\"off\">\n\n");
      out.write(
          "<table width=\"100%\" valign=\"top\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\n        ");
      out.write("<td width=\"32%\" valign=\"top\" bgcolor=\"#f0f0f0\">\n        ");
      out.write("<!-- BEGIN WALK SNMP TABLES -->\n            ");
      out.write(
          "<table width=\"100%\" valign=\"top\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n                ");
      out.write("<tr class=\"tableHeader\">\n                    ");
      out.write("<td class=\"tableHeader\" colspan=\"2\">Walk an SNMP Agent");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>IP Address:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_SNMP_IPADDR);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    ");
      out.write("<td class=\"tableText\" >");
      out.write("<input type=\"text\" name=\"ip\" value=\"");
      out.print(strIp);
      out.write("\" size=\"23\">");
      out.write("</td>\n                ");
      out.write("</tr>                \n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>Starting OID:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_SNMP_START_OID);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    ");
      out.write("<td class=\"tableText\" >");
      out.write("<input type=\"text\" size=\"23\" name=\"oid\" value=\"");
      out.print(strOID);
      out.write("\">");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>Port:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_SNMP_PORT);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    ");
      out.write("<td class=\"tableText\" >");
      out.write("<input type=\"text\" size=\"23\" maxlength=10 name=\"port\" value=\"");
      out.print(strPort);
      out.write("\" >");
      out.write("</td>               \t\t\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>Retries:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_RETRIES);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    ");
      out.write("<td class=\"tableText\" >");
      out.write("<input type=\"text\" size=\"4\" maxlength=10 name=\"retries\" value=\"");
      out.print(strRetries);
      out.write("\" >");
      out.write("</td>               \t\t\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>Timeout(ms):");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_TIMEOUT);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    ");
      out.write("<td class=\"tableText\" >");
      out.write("<input type=\"text\" size=\"23\" maxlength=10 name=\"timeout\" value=\"");
      out.print(strTimeout);
      out.write("\" >");
      out.write("</td>               \t\t\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>SNMP Version:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_SNMP_VERSION);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    ");
      out.write("<td class=\"tableText\" >\n                    \t");
      out.write(
          "<select name=\"version\" id=\"version\" onclick=\"checkForSNMPv3()\">\n                \t\t\t");
      out.write("<option ");
      out.print(version.equals("version 1") ? "SELECTED" : "");
      out.write(">version 1\n                \t\t\t");
      out.write("<option ");
      out.print(version.equals("version 2c") ? "SELECTED" : "");
      out.write(">version 2c\n\t");

      com.websina.license.LicenseManager lim = com.websina.license.LicenseManager.getInstance();
      if (lim != null) { // Check if license is not null
        if (lim.isValid()) { //  Check if license is valid
          if (((Boolean.valueOf(
                  lim.getFeature(com.websina.license.License.WT_SECURE_SNMPV3_ENABLED_FIELD_NAME)))
              .booleanValue())) { //  Check if feature is enabled
            if ((lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME)
                    > 0)
                || (lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME)
                    == -1)) { // Check if feature has expired (-1 indicates never expired)

              out.write("\t\t\t\t\n                \t\t\t");
              out.write("<option ");
              out.print(version.equals("version 3") ? "SELECTED" : "");
              out.write(">version 3\n\t");
            } else {
              out.write("\n\t\t\t\t\t\t\t");
              out.write("<!-- The text for ");
              out.write(
                  "<option disabled> tag is changed as a workaround for IE browsers -->\n\t\t\t\t");
              out.write(
                  "<!-- Although other browsers will not allow to select this option -->\n\t\t\t\t");
              out.write(
                  "<!-- IE lets you select it and hence call checkForSNMPv3() which displays a message that the feature is not enabled and select version 1 -->\n\t\t\t\t");
              out.write("<!-- SNMPv3 enabled and expired -->\n\t\t\t\t");
              out.write("<option disabled=\"disabled\" style=\"color:#aaa\">SNMPv3 expired");
              out.write("</option>\n\t");
            }
          } else {
            out.write("\n\t\t\t\t\t\t\t");
            out.write("<!-- License is valid, SNMPv3 is disabled -->\n\t\t\t\t");
            out.write("<option disabled=\"disabled\" style=\"color:#aaa\">SNMPv3 disabled");
            out.write("</option>\n     ");
          }
        }
      }
      out.write("  \n            \t\t\t");
      out.write("</select>\n                    ");
      out.write("</td>\n             \t");
      out.write("</tr>\n            ");
      out.write("</table>\n            \n            ");
      out.write("<!-- COMMUNITY STRING OPTION -->\n                \n            ");
      out.write("<div id=\"csOptions\" style=\"visibility: visible\"> \n\t\t\t\t");
      out.write(
          "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n                \t");
      out.write("<tr class=\"tableRowLight\">\n               \t  \t\t");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>Community String:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_SNMP_COMMSTR);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                   \t\t");
      out.write("<td class=\"tableText\" >");
      out.write("<input type=\"password\" name=\"cs\" value=\"");
      out.print(strCommunity);
      out.write("\" size=\"23\">");
      out.write("</td>\n                \t");
      out.write("</tr>\n             \t");
      out.write("</table>\n             ");
      out.write("</div>\n                \n\t\t\t");
      out.write("<!-- SNMP v3 OPTIONS -->               \n                \n\t\t\t");
      out.write("<div id=\"snmpOptions\" style=\"display: none; visibility: hidden\"> \n\t\t\t\t");
      out.write(
          "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t\t\t\n                \t");
      out.write("<!-- SNMP Version 3 Config Label -->\n                \t");
      out.write("<BR/>");
      out.write("<HR width=\"95% align=\"center\">\n                \t");
      out.write("<tr class=\"tableRowLight\">\n                \t\t");
      out.write("<td class=\"tableText\" colspan=\"2\">");
      out.write("<b>SNMP Version 3 Options");
      out.write("</b>");
      out.write("</td>\n                \t");
      out.write("</tr>                              \n                \t\n                \t");
      out.write("<!-- Security Name -->\n                \t");
      out.write("<tr class=\"tableRowLight\">\n                    \t");
      out.write("<td class=\"tableText\" width=\"45%\">");
      out.write("<b>Security Name:");
      out.write("</b>");
      out.write("</td>\n                    \t");
      out.write("<td class=\"tableText\" >");
      out.write(
          "<INPUT type=\"text\" name=\"securityname\" id=\"securityname\" size=\"23\" maxlength=\"255\" value=\"");
      out.print(securityname);
      out.write("\" >");
      out.write("</td>\n                \t");
      out.write("</tr> \n                \t\n                \t");
      out.write("<!-- Security Level Options -->\n                \t");
      out.write("<tr class=\"tableRowLight\"> \n                    \t");
      out.write("<td class=\"tableText\">");
      out.write("<b>Security Level:");
      out.write("</b>");
      out.write("<A class=\"tt\" HREF=\"javascript: towerTip(");
      out.print(WTTips.TIP_SNMP_SECURITY_LEVEL);
      out.write(");\" TITLE=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n               \t\t");
      out.write("</tr>\n               \t\t\n               \t\t");
      out.write("<!-- Authentication with Privacy radio button-->\n               \t\t");
      out.write("<tr class=\"tableRowLight\">\n                    \t");
      out.write("<td class=\"tableText\" colspan=\"2\">\n                    \t\t");
      out.write(
          "<input type=\"radio\" onClick=\"showAuthPriv();adjustFrames(600)\" name=\"seclevel\" id=\"authpriv\" \n                    \t\tvalue=\"AUTH_PRIV\" ");
      out.print("AUTH_PRIV".equals(seclevel) ? "CHECKED" : "");
      out.write("> \n                    \t\tAuthentication with Privacy\n                   \t\t");
      out.write("</td>\n               \t\t");
      out.write("</tr>\n               \t\t\n               \t\t");
      out.write("<!-- Authentication without Privacy radio button-->\n               \t\t");
      out.write("<tr class=\"tableRowLight\"> \n                    \t");
      out.write("<td class=\"tableText\" colspan=\"2\">\n                    \t\t");
      out.write(
          "<input type=\"radio\" onClick=\"showAuth();adjustFrames(500)\" name=\"seclevel\" id=\"authnopriv\" \n                    \t\tvalue=\"AUTH_NOPRIV\" ");
      out.print("AUTH_NOPRIV".equals(seclevel) ? "CHECKED" : "");
      out.write(
          "> \n                    \t\tAuthentication without Privacy\n                   \t\t");
      out.write("</td>\n               \t\t");
      out.write("</tr> \n               \t\t\n               \t\t");
      out.write("<!-- No Authentication and No Privacy radio button-->\n               \t\t");
      out.write("<tr class=\"tableRowLight\"> \n                    \t");
      out.write("<td class=\"tableText\" colspan=\"2\">\n                    \t\t");
      out.write(
          "<input type=\"radio\" onClick=\"hideAuthPriv();adjustFrames(420)\" name=\"seclevel\" id=\"noauthnopriv\" \n                    \t\tvalue=\"NOAUTH_NOPRIV\" ");
      out.print("NOAUTH_NOPRIV".equals(seclevel) ? "CHECKED" : "");
      out.write(
          "> \n                    \t\tNo Authentication and no Privacy\n                   \t\t");
      out.write("</td>\n               \t\t");
      out.write("</tr> \n               \t\t\n              \t");
      out.write("</table>\n\t\t\t");
      out.write("</div>  \t\n  \n\t\t\t");
      out.write("<!-- Authentication Passphrase & Protocol-->\t\n\t\t\t");
      out.write("<div id=\"authOptions\" style=\"display:none; visibility:hidden\"> \n\t\t\t\t");
      out.write(
          "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n               \t\t");
      out.write("<br/>\n               \t\t");
      out.write("<!-- Authentication Passphrase -->\n               \t\t");
      out.write("<tr class=\"tableRowLight\">               \t\t\t \n                    \t\t");
      out.write("<td class=\"tableText\" colspan=\"2\">");
      out.write("<b>Authentication:");
      out.write("</b>");
      out.write("</td> \n               \t\t");
      out.write("</tr> \n               \t\t");
      out.write("<tr class=\"tableRowLight\"> \n               \t\t\t");
      out.write("<td class=\"tableText\" width=\"31%\">Passphrase");
      out.write("<a class=\"tt\" href=\"javascript:towerTip(");
      out.print(WTTips.TIP_SNMP_AUTH_PASS);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    \t");
      out.write("<td class=\"tableText\" >");
      out.write(
          "<input type=\"password\" name=\"authpass\" id=\"authpassfld\" size=\"18\" maxlength=\"255\" value=\"");
      out.print(authpass);
      out.write("\" >&nbsp;(min. 8 char.)");
      out.write("</td>\n               \t\t");
      out.write("</tr>\n               \t\t               \t\t\n               \t\t");
      out.write("<!-- Authentication Protocol -->               \t\t\n               \t\t");
      out.write("<tr class=\"tableRowLight\"> \n               \t\t\t");
      out.write("<td class=\"tableText\" width=\"31%\">Protocol");
      out.write("<a class=\"tt\" href=\"javascript:towerTip(");
      out.print(WTTips.TIP_SNMP_AUTH_PROC);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    \t");
      out.write("<td class=\"tableText\" >\n                    \t\t");
      out.write("<select name=\"authproto\" id=\"authprotofld\">\n                \t\t\t\t");
      out.write("<option ");
      out.print("MD5".equals(authproto) ? "SELECTED" : "");
      out.write(">MD5");
      out.write("</option>\n                \t\t\t\t");
      out.write("<option ");
      out.print("SHA".equals(authproto) ? "SELECTED" : "");
      out.write(">SHA");
      out.write("</option>\n            \t\t\t\t");
      out.write("</select>            \t\t\t \n            \t\t\t");
      out.write("</td>                      \t             \t\t\n               \t\t");
      out.write("</tr>\n           \t\t");
      out.write("</table>\n\t\t\t");
      out.write("</div>  \t\n             \t\t\n            ");
      out.write("<!-- Privacy Passphrase & Protocol-->   \t\t\n\t       \t");
      out.write("<div id=\"privOptions\" style=\"display:none; visibility:hidden\"> \n\t\t\t\t");
      out.write(
          "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n               \t\t");
      out.write("<br/>               \t\t              \t\t\n               \t\t");
      out.write("<!-- Privacy Passphrase -->\n               \t\t");
      out.write("<tr class=\"tableRowLight\">\n                    \t\t");
      out.write("<td class=\"tableText\" colspan=\"2\">");
      out.write("<b>Privacy:");
      out.write("</b>");
      out.write("</td>\n                    ");
      out.write("</tr>                \t\t\n               \t\t\n               \t\t");
      out.write("<tr class=\"tableRowLight\"> \n               \t\t\t");
      out.write("<td class=\"tableText\" width=\"31%\">Passphrase");
      out.write("<a class=\"tt\" href=\"javascript:towerTip(");
      out.print(WTTips.TIP_SNMP_PRIV_PASS);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    \t");
      out.write("<td class=\"tableText\" >");
      out.write(
          "<input type=\"password\" name=\"privpass\" id=\"privpassfld\" size=\"18\" maxlength=\"255\" value=\"");
      out.print(privpass);
      out.write("\" >&nbsp;(min. 8 char.)");
      out.write("</td>\n               \t\t");
      out.write("</tr>\n               \t\t    \n               \t\t");
      out.write("<!-- Privacy Protocol -->              \t\t\n               \t\t");
      out.write("<tr class=\"tableRowLight\"> \n               \t\t\t");
      out.write("<td class=\"tableText\" width=\"31%\">Protocol");
      out.write("<a class=\"tt\" href=\"javascript:towerTip(");
      out.print(WTTips.TIP_SNMP_PRIV_PROC);
      out.write(");\" title=\"Telemetry Tip\">");
      out.write("<img src=\"/wt-portal/images/icons/tower_tips.gif\" border=\"0\">");
      out.write("</a>");
      out.write("</td>\n                    \t");
      out.write("<td class=\"tableText\" >                    \t\t\n                    \t\t");
      out.write("<select name=\"privproto\" id=\"privprotofld\">\n                \t\t\t\t");
      out.write("<option ");
      out.print("DES".equals(privproto) ? "SELECTED" : "");
      out.write(">DES");
      out.write("</option>\n                \t\t\t\t");
      out.write("<option ");
      out.print("AES 128".equals(privproto) ? "SELECTED" : "");
      out.write(">AES 128");
      out.write("</option>\n                \t\t\t\t");
      out.write("<option ");
      out.print("AES 192".equals(privproto) ? "SELECTED" : "");
      out.write(">AES 192");
      out.write("</option>\n                \t\t\t\t");
      out.write("<option ");
      out.print("AES 256".equals(privproto) ? "SELECTED" : "");
      out.write(">AES 256");
      out.write("</option>\n            \t\t\t\t");
      out.write("</select>\n            \t\t\t");
      out.write("</td>                      \t             \t\t\n               \t\t");
      out.write("</tr> \n       \t\t\t");
      out.write("</table>\n\t\t\t");
      out.write("</div>              \t\t\n                           \n     \t\t");
      out.write("<!-- End of SNMP v3 OPTIONS --> \n       \n        \t");
      out.write("<!-- SNMP Submit button -->\n\t\t\t");
      out.write("<tr class=\"tableRowLight\">\n\t\t\t\t");
      out.write("<td class=\"tableText\" colspan=\"2\">\n             \t\t");
      out.write("<INPUT type=\"hidden\" name=\"button\" value=\"\">\n\t\t\t\t\t");
      out.write(
          "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_walk.gif\" onClick=\"document.snmpwalk.button.value='Walk'; return validateForm();\">\n       \t\t\t");
      out.write("</td>\n       \t\t");
      out.write("</tr>\n\t");

      if (lim != null) { // Check if license is not null
        if (lim.isValid()) { //  Check if license is valid
          if (((Boolean.valueOf(
                  lim.getFeature(com.websina.license.License.WT_SECURE_SNMPV3_ENABLED_FIELD_NAME)))
              .booleanValue())) { //  Check if feature is enabled
            if ((lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME)
                    > 0)
                || (lim.daysLeft(com.websina.license.License.WT_SECURE_SNMPV3_EXPIRATION_FIELD_NAME)
                    == -1)) { // Check if feature has expired (-1 indicates never expired)

              out.write("\t\t\n       \t\t");
              out.write("<!-- License valid, SNMPv3 enabled and expired -->\t\t\t\n       \t\t");
              out.write("<tr class=\"tableRowLight\">\n       \t\t\t");
              out.write("<td colspan=\"2\">");
              out.write(
                  "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
              out.write("</td>\n       \t\t");
              out.write("</tr>\n   ");
            } else {
              out.write("\n       \t\t");
              out.write("<!-- SNMPv3 enabled and expired -->\n       \t\t");
              out.write("<tr class=\"tableRowLight\">\n       \t\t\t");
              out.write("<td colspan=\"2\" class=\"tableText\">");
              out.write("<span class=\"error\">Access to SNMP v3 has expired.");
              out.write("</span>");
              out.write("<br>&nbsp;\n       \t\t\t");
              out.write("</td>\n\t\t\t");
              out.write("</tr>\n   ");
            }
          } else {
            out.write("\n       \t\t");
            out.write("<!-- License is valid, SNMPv3 is disabled -->\n       \t\t");
            out.write("<tr class=\"tableRowLight\">\n       \t\t\t");
            out.write("<td colspan=\"2\">");
            out.write(
                "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
            out.write("</td>\n       \t\t");
            out.write("</tr>\n     ");
          }
        }
      }
      out.write("    \n\n\t\t\t");
      out.write("</table>\n        ");
      out.write("<!-- END WALK SNMP TABLES -->\n        ");
      out.write("</td>               \n  \n        ");
      out.write("<td valign=\"top\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n        ");
      out.write("<td valign=\"top\" bgcolor=\"#f0f0f0\">\n        ");
      out.write("<!-- BEGIN MIB TABLE -->\n            ");
      out.write(
          "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n                ");
      out.write("<tr class=\"tableHeader\">\n                    ");
      out.write("<td class=\"tableHeader\">View MIBs");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\">\n                    \t");
      out.write("<select name=mibs size=7>\n\t\t\t\t\t\t    ");

      if (vMibs != null) {
        for (int j = 0; j < vMibs.size(); j++) {

          out.print("<OPTION>" + (String) vMibs.get(j));
        }
      }

      out.write("\n\t\t\t\t\t    ");
      out.write("</select>\n                    ");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\">\n\t\t\t\t\t");
      out.write(
          "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_view_MIB.gif\" onClick=\"document.snmpwalk.button.value='View MIB'; return viewMIB();\">&nbsp;&nbsp;");
      out.write(
          "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_reload_MIB.gif\" onClick=\"document.snmpwalk.button.value='Reload MIBs';\">");
      out.write("</td>\n                ");
      out.write("</tr>\n            ");
      out.write("</table>\n        ");
      out.write("<!-- END MIB TABLE -->\n        ");
      out.write("</td>\n        \n        ");
      out.write("<td valign=\"top\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\n\t\t");
      out.write("<td valign=\"top\" bgcolor=\"#f0f0f0\">\n        ");
      out.write("<!-- BEGIN ASN TABLE -->\n            ");
      out.write(
          "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n                ");
      out.write("<tr class=\"tableHeader\">\n                    ");
      out.write("<td class=\"tableHeader\">Lookup ASN.1 Values By Name");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\">");
      out.write("<INPUT type=\"text\" name=\"desc\" value=\"");
      out.print(strDesc);
      out.write("\" size=\"30\" >");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\">");
      out.write("<textarea cols=\"30\" rows=\"5\">");
      out.print(strASN1);
      out.write("</textarea>");
      out.write("</td>\n                ");
      out.write("</tr>\n                ");
      out.write("<tr class=\"tableRowLight\">\n                    ");
      out.write("<td class=\"tableText\">\n\t                    ");
      out.write(
          "<INPUT type=\"image\" src=\"/wt-portal/images/buttons/btn_lookup.gif\" onClick=\"document.snmpwalk.button.value='lookup'; return validateLookup();\">\n                    ");
      out.write("</td>\n                ");
      out.write("</tr>\n            ");
      out.write("</table>");
      out.write("<BR>\n        ");
      out.write("<!-- END ASN TABLE -->\n        ");
      out.write("</td>        \n    \t");
      out.write("<td valign=\"top\">");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"10\" width=\"10\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>        \n    ");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("</form>\n");
      out.write("<!-- BEGIN FRAMING TABLE:close tags-->\n\t\t");
      out.write("</td>\n\t");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("<!-- END FRAMING TABLE:close tags-->   \n  ");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }