@Override
  public void setValue(ELContext elContext, Object base, Object property, Object value) {

    if (elContext == null) {
      throw new NullPointerException();
    }

    if (base != null) {
      return;
    }

    elContext.setPropertyResolved(true);

    if (property instanceof String) {
      PageContext pageContext = (PageContext) elContext.getContext(JspContext.class);

      String attribute = (String) property;

      if (pageContext.getAttribute(attribute, PageContext.REQUEST_SCOPE) != null) {

        pageContext.setAttribute(attribute, value, PageContext.REQUEST_SCOPE);
      } else if (pageContext.getAttribute(attribute, PageContext.SESSION_SCOPE) != null) {

        pageContext.setAttribute(attribute, value, PageContext.SESSION_SCOPE);
      } else if (pageContext.getAttribute(attribute, PageContext.APPLICATION_SCOPE) != null) {

        pageContext.setAttribute(attribute, value, PageContext.APPLICATION_SCOPE);
      } else {
        pageContext.setAttribute(attribute, value, PageContext.PAGE_SCOPE);
      }
    }
  }
  @Override
  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object base) {

    List<FeatureDescriptor> featureDescriptors = new ArrayList<>();

    PageContext pageContext = (PageContext) elContext.getContext(JspContext.class);

    Enumeration<?> enumeration = pageContext.getAttributeNamesInScope(PageContext.PAGE_SCOPE);

    while (enumeration.hasMoreElements()) {
      String name = (String) enumeration.nextElement();

      Object value = pageContext.getAttribute(name, PageContext.PAGE_SCOPE);

      FeatureDescriptor featureDescriptor = getFeatureDescriptor(name, value, "page");

      featureDescriptors.add(featureDescriptor);
    }

    enumeration = pageContext.getAttributeNamesInScope(PageContext.REQUEST_SCOPE);

    while (enumeration.hasMoreElements()) {
      String name = (String) enumeration.nextElement();

      Object value = pageContext.getAttribute(name, PageContext.REQUEST_SCOPE);

      FeatureDescriptor featureDescriptor = getFeatureDescriptor(name, value, "request");

      featureDescriptors.add(featureDescriptor);
    }

    enumeration = pageContext.getAttributeNamesInScope(PageContext.SESSION_SCOPE);

    while (enumeration.hasMoreElements()) {
      String name = (String) enumeration.nextElement();

      Object value = pageContext.getAttribute(name, PageContext.SESSION_SCOPE);

      FeatureDescriptor featureDescriptor = getFeatureDescriptor(name, value, "session");

      featureDescriptors.add(featureDescriptor);
    }

    enumeration = pageContext.getAttributeNamesInScope(PageContext.APPLICATION_SCOPE);

    while (enumeration.hasMoreElements()) {
      String name = (String) enumeration.nextElement();

      Object value = pageContext.getAttribute(name, PageContext.APPLICATION_SCOPE);

      FeatureDescriptor featureDescriptor = getFeatureDescriptor(name, value, "application");

      featureDescriptors.add(featureDescriptor);
    }

    return featureDescriptors.iterator();
  }
Example #3
0
  /**
   * 搜索路径 page=>request=>session=>application
   *
   * @param name
   * @return
   * @throws JspException
   */
  public static Object lookup(PageContext pageContext, String name) throws JspException {
    Object result = pageContext.findAttribute(name);

    if (null == result) {
      result = pageContext.getAttribute(name, PageContext.REQUEST_SCOPE);
    }
    if (null == result) {
      result = pageContext.getAttribute(name, PageContext.SESSION_SCOPE);
    }
    if (null == result) {
      result = pageContext.getAttribute(name, PageContext.APPLICATION_SCOPE);
    }
    return result;
  }
 public static String generateId(PageContext pageContext) {
   Long counter = (Long) pageContext.getAttribute(COUNTER_KEY_REQUEST, PageContext.REQUEST_SCOPE);
   if (counter == null) counter = new Long(0);
   else counter = new Long(counter.longValue() + 1);
   pageContext.setAttribute(COUNTER_KEY_REQUEST, counter, PageContext.REQUEST_SCOPE);
   return "system_form_" + counter;
 }
Example #5
0
  /**
   * Gets the optionalAttribute attribute of the WebUtils class
   *
   * @param page Description of the Parameter
   * @param name Description of the Parameter
   * @param scope Description of the Parameter
   * @return The optionalAttribute value
   */
  public static String getOptionalAttribute(PageContext page, String name, int scope) {
    Object ret = page.getAttribute(name, scope);

    if (ret == null) {
      return "";
    }
    return ret.toString();
  }
Example #6
0
  /**
   * Gets the requiredAttribute attribute of the WebUtils class
   *
   * @param page Description of the Parameter
   * @param name Description of the Parameter
   * @param scope Description of the Parameter
   * @return The requiredAttribute value
   */
  public static String getRequiredAttribute(PageContext page, String name, int scope) {
    Object ret = page.getAttribute(name, scope);

    if (ret == null) {
      throw new NullPointerException(
          "This form requires a \""
              + name
              + "\" parameter, which was missing from the submitted request.");
    }
    return ret.toString();
  }
Example #7
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    response.setContentType("text/html;charset=windows-1252");
    /* set up the intrinsic variables using the pageContext goober:
     ** session = HttpSession
     ** application = ServletContext
     ** out = JspWriter
     ** page = this
     ** config = ServletConfig
     ** all session/app beans declared in globals.jsa
     */
    PageContext pageContext =
        JspFactory.getDefaultFactory()
            .getPageContext(this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
    // Note: this is not emitted if the session directive == false
    HttpSession session = pageContext.getSession();
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE)
        != null) {
      pageContext.setAttribute(
          OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE);
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
      return;
    }
    int __jsp_tag_starteval;
    ServletContext application = pageContext.getServletContext();
    JspWriter out = pageContext.getOut();
    _mainMib page = this;
    ServletConfig config = pageContext.getServletConfig();

    try {
      // global beans
      // end global beans

      /*@lineinfo:user-code*/
      /*@lineinfo:1^1*/
      session.setAttribute("ip", request.getParameter("ip"));

      /*@lineinfo:generated-code*/
      out.write(__oracle_jsp_text[0]);

    } catch (Throwable e) {
      try {
        if (out != null) out.clear();
      } catch (Exception clearException) {
      }
      pageContext.handlePageException(e);
    } finally {
      OracleJspRuntime.extraHandlePCFinally(pageContext, false);
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }
Example #8
0
 protected int getNextUniqueId(final PageContext pageContext) {
   final Object value = pageContext.getAttribute(TEST_ID_TAG_NEXT, PageContext.PAGE_SCOPE);
   if (value instanceof Integer) {
     final int nextVal = ((Integer) value).intValue();
     pageContext.setAttribute(
         TEST_ID_TAG_NEXT, Integer.valueOf(nextVal + 1), PageContext.PAGE_SCOPE);
     return nextVal;
   } else {
     // No attribute found, set next to 2, and return 1.
     pageContext.setAttribute(TEST_ID_TAG_NEXT, Integer.valueOf(2), PageContext.PAGE_SCOPE);
     return 1;
   }
 }
Example #9
0
  public void _jspService(
      final javax.servlet.http.HttpServletRequest request,
      final javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {

    final java.lang.String _jspx_method = request.getMethod();
    if (!"GET".equals(_jspx_method)
        && !"POST".equals(_jspx_method)
        && !"HEAD".equals(_jspx_method)
        && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
      response.sendError(
          HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD");
      return;
    }

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

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

      out.write("\n");
      out.write("  \n");
      out.write(" ");
      request.setCharacterEncoding("utf-8");
      out.write('\n');
      out.write(' ');
      movie.admin.filmBean gb = null;
      gb =
          (movie.admin.filmBean)
              _jspx_page_context.getAttribute("gb", javax.servlet.jsp.PageContext.PAGE_SCOPE);
      if (gb == null) {
        gb = new movie.admin.filmBean();
        _jspx_page_context.setAttribute("gb", gb, javax.servlet.jsp.PageContext.PAGE_SCOPE);
      }
      out.write('\n');
      out.write(' ');
      movie.admin.film _film = null;
      _film =
          (movie.admin.film)
              _jspx_page_context.getAttribute("_film", javax.servlet.jsp.PageContext.PAGE_SCOPE);
      if (_film == null) {
        _film = new movie.admin.film();
        _jspx_page_context.setAttribute("_film", _film, javax.servlet.jsp.PageContext.PAGE_SCOPE);
      }
      out.write('\n');
      out.write(' ');
      org.apache.jasper.runtime.JspRuntimeLibrary.introspect(
          _jspx_page_context.findAttribute("_film"), request);
      out.write("\n");
      out.write(" \n");
      out.write("\n");
      out.write(" ");

      String action = request.getParameter("action");

      if (action.equals("list")) {
        ArrayList<film> films = gb.getDBlist();
        request.setAttribute("datas", films);
        pageContext.forward("admin_mode.jsp");
      }
      if (action.equals("back")) {
        ArrayList<film> films = gb.getDBlist();
        request.setAttribute("datas", films);
        pageContext.forward("admin_mode.jsp");
      } else if (action.equals("insert")) {
        if (gb.insertDB(_film)) {
          response.sendRedirect("film_control.jsp?action=list");
        } else throw new Exception("DB 입력 오류");
      } else if (action.equals("delete")) {

        if (gb.deleteDB(_film.getId_film())) {
          response.sendRedirect("film_control.jsp?action=list");
        } else throw new Exception("DB 삭제 오류");
      }
      // else if(action.equals("update")){
      // }
      else {
      }

      out.write("\n");
      out.write("    \n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("<title>Insert title here</title>\n");
      out.write("</head>\n");
      out.write("<body>\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html>");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<!-- DW6 -->\r\n<head>\r\n<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>DEPTHS</title>\r\n<link rel=\"stylesheet\" href=\"../css/unitTemplate.css\" type=\"text/css\"/>\r\n</style><style type=\"text/css\">\r\n  <!--\r\n    .copyrightStyle {\r\n    font-size: 12px;\r\n    color: #006699;\r\n    }\r\n  -->\r\n</style>\r\n\r\n<script language=\"javascript\" src=\"js/matching_columns.js\" type=\"text/javascript\"></script>\r\n</head>\r\n<!-- JSP code -->\r\n");
      depths.presentationModule.teacher.TeacherBean teacherBeanId = null;
      synchronized (session) {
        teacherBeanId =
            (depths.presentationModule.teacher.TeacherBean)
                _jspx_page_context.getAttribute("teacherBeanId", PageContext.SESSION_SCOPE);
        if (teacherBeanId == null) {
          teacherBeanId = new depths.presentationModule.teacher.TeacherBean();
          _jspx_page_context.setAttribute(
              "teacherBeanId", teacherBeanId, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      depths.presentationModule.admin.AdminBean adminBeanId = null;
      synchronized (session) {
        adminBeanId =
            (depths.presentationModule.admin.AdminBean)
                _jspx_page_context.getAttribute("adminBeanId", PageContext.SESSION_SCOPE);
        if (adminBeanId == null) {
          adminBeanId = new depths.presentationModule.admin.AdminBean();
          _jspx_page_context.setAttribute("adminBeanId", adminBeanId, PageContext.SESSION_SCOPE);
        }
      }
      out.write("\r\n\r\n");
      out.write('\r');
      out.write('\n');
      privilegies = teacherBeanId.getTeacherPrivilegies();
      out.write("\r\n\r\n");
      out.write('\r');
      out.write('\n');
      if (privilegies.isEmpty()) {
        hasPrivilegies = "guest";
      } else {
        hasPrivilegies = "Limited";
        int privNumb = privilegies.size();
        for (int i = 0; i < privNumb; i++) {
          String priv = privilegies.get(i).toString();

          if (priv.equals("create new student")) {
            hasPrivilegies = "create new student";
          }
        }
      }

      out.write("\r\n\r\n\r\n\r\n");
      if (!hasPrivilegies.equals("Limited")) {
        out.write(
            "\r\n<body>\r\n\r\n<div id=\"page\">\r\n<DIV id=masthead>\r\n<DIV id=globalNav><a href=\"#\">Performance</a> |\r\n<a href=\"#\">Statistic</a> |\r\n<a href=\"#\">Tools</a> |\r\n<a href=\"#\">Help</a>\r\n</DIV><!--globalNav-->\r\n</DIV><!--mastHead-->\r\n  <div id=\"navBar\" class=\"column\">\r\n  <div id=\"blank\">\r\n    <p>&nbsp;</p>\r\n    <p>&nbsp;</p>\r\n    <p>&nbsp;</p>\r\n  </div> <!--blank-->\r\n  <div id=\"search\">\r\n    <label>Links</label>\r\n  </div><!--search-->\r\n  <div id=\"sectionLinks\">\r\n\r\n     <a href=\"editMyProfilePage.jsp\" >Edit my profile</a>\r\n\r\n\t<br />\r\n\r\n\r\n  </div><!--sectionLinks-->\r\n  <div id=\"search\">\r\n    <br/>\r\n    <br/>\r\n    <label>Passed concepts</label>\r\n  </div> <!--search-->\r\n  <div id=\"sectionLinks\">\r\n\r\n\r\n\r\n\r\n  <a href=\"bla bla\" >bla bla\r\n    </a><br />\r\n\r\n\r\n  </div><!--sectionLinks-->\r\n  <div id=\"advert\">\r\n    <p>&nbsp;</p>\r\n  </div><!--adverts-->\r\n  <div id=\"headlines\">\r\n  </div><!--headlines-->\r\n</div><!--navBar-->\r\n<div id=\"content\" class=\"column\">\r\n\r\n  <div id=\"previousNextLinks\">\r\n    <div id=\"breadCrumb\">\r\n\r\n\r\n    </div><!--breadCrumb-->\r\n");
        out.write(
            "    <div id=\"breadCrumb2\">\r\n\r\n\r\n    </div>\r\n  </div><!--previousNextLinks-->\r\n  <br/>\r\n  <br/>\r\n  <h1 id=\"pageName\">Welcome to the DEPTHS learning system </h1>\r\n  <div class=\"story\">\r\n\r\n\r\n      <h2>&nbsp;</h2>\r\n\r\n      <TABLE width=500 align=center>\r\n      <FORM name=studentRegisterForm method=\"POST\" action=\"settingNewStudentData.jsp\">\r\n        <TBODY>\r\n        ");
        if (teacherBeanId.isStudentUserNameExist()) {
          out.write(
              "\r\n          <TR>\r\n            <TD class=PageTitle colSpan=2>\r\n              <FONT color=red>\r\n                <B>\r\n                  <BIG>You have selected username that is already in use.</BIG>\r\n                </B>\r\n              </FONT>\r\n            </TD>\r\n          </TR>\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>              Please choose another one or go to the existing users page\r\n\r\n            </TD>\r\n          </TR>\r\n        ");
        } else {
          out.write("\r\n        ");
          out.write(
              "\r\n          <TR>\r\n            <TD class=PageTitle colSpan=2>\r\n              <H2>New teacher registration</H2>\r\n            </TD>\r\n          </TR>\r\n        ");
          if (hasPrivilegies.equals("Guest")) {
            out.write(
                "\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>You do not have enough privilegies to create new student.</TD>\r\n          </TR>\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>You can only preview this option as a guest.</TD>\r\n          </TR>\r\n        ");
          } else {
            out.write(
                "\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>Please fill form for new student.</TD>\r\n          </TR>\r\n        ");
          }
          out.write("\r\n        ");
        }
        out.write(
            "\r\n          <TR>\r\n            <TD>&nbsp;</TD>\r\n          </TR>\r\n          <TR>\r\n            <!--\r\n              <TD class=title align=left colSpan=2>Account information / about\r\n              you</TD>\r\n            -->\r\n          </TR>\r\n          <TR>\r\n            <TD class=text align=left colSpan=2>              All fields marked with an\r\n              <FONT color=red>\r\n                <B>\r\n                  <BIG>*</BIG>\r\n                </B>\r\n              </FONT>\r\n              are required.\r\n</TD>\r\n          </TR>\r\n          <TR>\r\n            <TD colSpan=2>\r\n              <TABLE cellSpacing=1 cellPadding=2 width=\"95%\" border=0>\r\n                <TBODY>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD width=\"30%\" align=left noWrap class=text>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      First name\r\n</TD>\r\n                    <TD width=\"12%\" align=left noWrap class=text>\r\n                      <INPUT size=50 name=firstName>\r\n                    </TD>\r\n");
        out.write(
            "                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      Last name\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=lastName>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>\r\n                      <FONT color=red>                        &nbsp;\r\n                        *\r\n</FONT>\r\n                      Username\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=userName checked>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>\r\n                      <FONT color=red>                        &nbsp;\r\n                        *\r\n</FONT>\r\n                      Email address\r\n");
        out.write(
            "</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=email>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      Your Password\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT type=password size=30 name=password>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      Repeat password\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT type=password size=30 name=passwordConfirmation>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n");
        out.write(
            "                      Address\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=30 name=address>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n                      City\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=30 name=city>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;\r\n                      &nbsp;&nbsp;\r\n                      Country of residence\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      ");
        adminBeanId.getCountries();
        out.write("\r\n                    ");
        adminBeanId.getCountriesIds();
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        numbOfCountries = adminBeanId.getNumbOfCountries();
        out.write(
            "\r\n                      <select name=\"selectedCountry\">\r\n                      ");
        for (int i = 0; i < numbOfCountries; i++) {
          out.write("\r\n                        ");
          countryId = adminBeanId.getCountryId(i);
          out.write("\r\n                        <OPTION value='");
          out.print(countryId);
          out.write('\'');
          out.write('>');
          out.print(adminBeanId.getCountryName(i));
          out.write("                        </OPTION>\r\n                      ");
        }
        out.write(
            "\r\n                      </select>\r\n\r\n\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n                      Organization\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=organization>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n                      Web Site\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=60 value=http:// name=webSite>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=title noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n                      Your language\r\n                      settings\r\n</TD>\r\n                    <TD align=left noWrap class=text>&nbsp;</TD>\r\n");
        out.write(
            "                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n\r\n              ");
        adminBeanId.getLanguages();
        out.write("\r\n                    ");
        adminBeanId.getLanguagesIds();
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        numbOfLanguages = adminBeanId.getNumbOfLanguages();
        out.write("\r\n                      <select name=\"language\">\r\n                      ");
        for (int i = 0; i < numbOfLanguages; i++) {
          out.write("\r\n                        ");
          languageId = adminBeanId.getLanguageId(i);
          out.write("\r\n                        ");
          languageName = adminBeanId.getLanguageName(i);
          out.write("\r\n\r\n                        <OPTION value='");
          out.print(languageId);
          out.write('\'');
          out.write('>');
          out.print(languageName);
          out.write(" </OPTION>\r\n\r\n                      ");
        }
        out.write(
            "\r\n                      </select>\r\n\r\n                    </TD>\r\n                    <TD align=left noWrap class=text>&nbsp;</TD>\r\n                  </TR>\r\n\r\n              </TABLE>\r\n            </TD>\r\n\r\n          <TR>\r\n            <TD align=center colSpan=2>\r\n              <input type=\"submit\" name=\"backButton\" value=\"Back\">&nbsp;&nbsp;\r\n              <INPUT type=submit value=Submit tabindex=\"0\">\r\n            </TD>\r\n          </TR>\r\n\r\n      </FORM>\r\n\r\n\r\n\r\n</TBODY>      </TABLE>\r\n\r\n\r\n\r\n\r\n      <p>&nbsp;</p>\r\n\r\n  </div><!--story-->\r\n</div><!--content-->\r\n<!--end content -->\r\n\r\n<!--end navbar -->\r\n<div id=\"siteInfo\" align=\"center\">\r\n  <a href=\"#\">About Us</a>\r\n  |\r\n  <a href=\"#\">Site Map</a>\r\n  |\r\n  <a href=\"#\">Privacy Policy</a>\r\n  |\r\n  <a href=\"mailto:[email protected]\">Contact Us</a>\r\n  <br/>\r\n  <span class=\"copyrightStyle\">    &copy;\r\n    2006 FON - School of Business Administration, University of Belgrade\r\n</span>\r\n</div><!-siteInfo-->\r\n<br/>\r\n</div>\r\n</body>\r\n");
      } else {
        out.write(
            "\r\n\r\n<script type=\"text/javascript\">\r\nvar name = confirm(\"ERROR: You do not have enough privilegies for this !\")\r\nif (name == true)\r\n{\r\nlocation=\"teacherWelcomeScreen.jsp\"\r\n}else{\r\n  history.go(-1);\r\n}\r\n</script>\r\n");
      }
      out.write("\r\n</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #11
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n\n\n\n\n\n\n\n\n");
      org.jivesoftware.admin.AdminPageBean info = null;
      synchronized (request) {
        info =
            (org.jivesoftware.admin.AdminPageBean)
                _jspx_page_context.getAttribute("info", PageContext.REQUEST_SCOPE);
        if (info == null) {
          info = new org.jivesoftware.admin.AdminPageBean();
          _jspx_page_context.setAttribute("info", info, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\n');
      out.write('\n');
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      webManager.init(request, response, session, application, out);
      out.write('\n');
      out.write('\n');
      //  decorator:usePage
      com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_usePage_0 =
          (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag)
              _jspx_tagPool_decorator_usePage_id_nobody.get(
                  com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
      _jspx_th_decorator_usePage_0.setPageContext(_jspx_page_context);
      _jspx_th_decorator_usePage_0.setParent(null);
      _jspx_th_decorator_usePage_0.setId("decoratedPage");
      int _jspx_eval_decorator_usePage_0 = _jspx_th_decorator_usePage_0.doStartTag();
      if (_jspx_th_decorator_usePage_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_decorator_usePage_id_nobody.reuse(_jspx_th_decorator_usePage_0);
        return;
      }
      _jspx_tagPool_decorator_usePage_id_nobody.reuse(_jspx_th_decorator_usePage_0);
      com.opensymphony.module.sitemesh.Page decoratedPage = null;
      decoratedPage =
          (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("decoratedPage");
      out.write('\n');
      out.write('\n');

      String path = request.getContextPath();
      // Decorated pages will typically must set a pageID and optionally set a subPageID
      // and extraParams. Store these values as request attributes so that the tab and sidebar
      // handling tags can get at the data.
      request.setAttribute("pageID", decoratedPage.getProperty("meta.pageID"));
      request.setAttribute("subPageID", decoratedPage.getProperty("meta.subPageID"));
      request.setAttribute("extraParams", decoratedPage.getProperty("meta.extraParams"));

      // Message HTML can be passed in:
      String message = decoratedPage.getProperty("page.message");

      out.write("\n\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n");
      if (_jspx_meth_fmt_setBundle_0(_jspx_page_context)) return;
      out.write("\n<html>\n<head>\n    <title>");
      out.print(AdminConsole.getAppName());
      out.write(' ');
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(':');
      out.write(' ');
      if (_jspx_meth_decorator_title_0(_jspx_page_context)) return;
      out.write(
          "</title>\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write(
          "/style/global.css\">\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/prototype.js\"></script>\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/scriptaculous.js\"></script>\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/cookies.js\"></script>\n    <script language=\"JavaScript\" type=\"text/javascript\">\n\n    </script>\n    <script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/behaviour.js\"></script>\n    <script type=\"text/javascript\">\n    // Add a nice little rollover effect to any row in a jive-table object. This will help\n    // visually link left and right columns.\n    /*\n    var myrules = {\n        '.jive-table TBODY TR' : function(el) {\n            el.onmouseover = function() {\n                this.style.backgroundColor = '#ffffee';\n            }\n            el.onmouseout = function() {\n                this.style.backgroundColor = '#ffffff';\n            }\n        }\n    };\n    Behaviour.register(myrules);\n    */\n    </script>\n    ");
      if (_jspx_meth_decorator_head_0(_jspx_page_context)) return;
      out.write(
          "\n</head>\n\n<body id=\"jive-body\">\n\n<!-- BEGIN main -->\n<div id=\"main\">\n\n    <div id=\"jive-header\">\n        <div id=\"jive-logo\">\n            <a href=\"/index.jsp\"><img src=\"/images/login_logo.gif\" alt=\"Openfire\" width=\"179\" height=\"53\" /></a>\n        </div>\n        <div id=\"jive-userstatus\">\n            ");
      out.print(AdminConsole.getAppName());
      out.write(' ');
      out.print(AdminConsole.getVersionString());
      out.write("<br/>\n            ");
      //  fmt:message
      org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_1 =
          (org.apache.taglibs.standard.tag.rt.fmt.MessageTag)
              _jspx_tagPool_fmt_message_key.get(
                  org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
      _jspx_th_fmt_message_1.setPageContext(_jspx_page_context);
      _jspx_th_fmt_message_1.setParent(null);
      _jspx_th_fmt_message_1.setKey("admin.logged_in_as");
      int _jspx_eval_fmt_message_1 = _jspx_th_fmt_message_1.doStartTag();
      if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.pushBody();
          _jspx_th_fmt_message_1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
          _jspx_th_fmt_message_1.doInitBody();
        }
        do {
          //  fmt:param
          org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_0 =
              (org.apache.taglibs.standard.tag.rt.fmt.ParamTag)
                  _jspx_tagPool_fmt_param_value_nobody.get(
                      org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
          _jspx_th_fmt_param_0.setPageContext(_jspx_page_context);
          _jspx_th_fmt_param_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_1);
          _jspx_th_fmt_param_0.setValue(
              "<strong>"
                  + StringUtils.escapeHTMLTags(JID.unescapeNode(webManager.getUser().getUsername()))
                  + "</strong>");
          int _jspx_eval_fmt_param_0 = _jspx_th_fmt_param_0.doStartTag();
          if (_jspx_th_fmt_param_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
            return;
          }
          _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
          int evalDoAfterBody = _jspx_th_fmt_message_1.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
        if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = _jspx_page_context.popBody();
      }
      if (_jspx_th_fmt_message_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_1);
        return;
      }
      _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_1);
      out.write(" - <a href=\"");
      out.print(path);
      out.write("/index.jsp?logout=true\">");
      out.print(LocaleUtils.getLocalizedString("global.logout"));
      out.write(
          "</a>\n        </div>\n        <div id=\"jive-nav\">\n            <div id=\"jive-nav-left\"></div>\n            ");
      if (_jspx_meth_admin_tabs_0(_jspx_page_context)) return;
      out.write(
          "\n            <div id=\"jive-nav-right\"></div>\n        </div>\n        <div id=\"jive-subnav\">\n            ");
      if (_jspx_meth_admin_subnavbar_0(_jspx_page_context)) return;
      out.write(
          "\n        </div>\n    </div>\n\n    <div id=\"jive-main\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n    <tbody>\n        <tr valign=\"top\">\n            <td width=\"1%\">\n                <div id=\"jive-sidebar-container\">\n                    <div id=\"jive-sidebar-box\">\n                        <div id=\"jive-sidebar\">\n                            ");
      if (_jspx_meth_admin_sidebar_0(_jspx_page_context)) return;
      out.write("\n                            <br>\n                            <img src=\"");
      out.print(path);
      out.write(
          "/images/blank.gif\" width=\"150\" height=\"1\" border=\"0\" alt=\"\">\n                        </div>\n                    </div>\n                </div>\n            </td>\n            <td width=\"99%\" id=\"jive-content\">\n\n\n                ");
      if (message != null) {
        out.write("\n\n                    ");
        out.print(message);
        out.write("\n\n                ");
      }
      out.write("\n\n                <h1>\n                    ");
      if (_jspx_meth_decorator_title_1(_jspx_page_context)) return;
      out.write(
          "\n                </h1>\n\n                <div id=\"jive-main-content\">\n                    ");
      if (_jspx_meth_decorator_body_0(_jspx_page_context)) return;
      out.write(
          "\n                </div>\n            </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n\n</div>\n<!-- END main -->\n\n<!-- BEGIN footer -->\n\t<div id=\"jive-footer\">\n        <div class=\"jive-footer-nav\">\n            ");
      if (_jspx_meth_admin_tabs_1(_jspx_page_context)) return;
      out.write(
          "\n        </div>\n        <div class=\"jive-footer-copyright\">\n            Built by <a href=\"http://www.jivesoftware.com\">Jive Software</a> and the <a href=\"http://www.igniterealtime.org\">IgniteRealtime.org</a> community\n        </div>\n    </div>\n<!-- END footer -->\n\n</body>\n</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n\n\n\n\n\n\n<html>\n<head>\n    <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/style/global.css\">\n    <style type=\"text/css\">\n        .drop-shadow {\n             font-weight: bold;\n             font-size: 14pt;\n             color: white;\n             text-shadow: black 0.1em 0.1em 0.2em;\n             padding-top: 21px;}\n    </style>\n    <meta name=\"decorator\" content=\"none\"/>\n</head>\n\n");
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      java.util.HashMap errors = null;
      synchronized (_jspx_page_context) {
        errors =
            (java.util.HashMap) _jspx_page_context.getAttribute("errors", PageContext.PAGE_SCOPE);
        if (errors == null) {
          errors = new java.util.HashMap();
          _jspx_page_context.setAttribute("errors", errors, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      webManager.init(request, response, session, application, out);

      boolean create = request.getParameter("create") != null;
      String username = ParamUtils.getParameter(request, "username");
      String name = ParamUtils.getParameter(request, "name");
      String email = ParamUtils.getParameter(request, "email");
      String password = ParamUtils.getParameter(request, "password");
      String passwordConfirm = ParamUtils.getParameter(request, "passwordConfirm");
      String reCaptchaChallenge = ParamUtils.getParameter(request, "recaptcha_challenge_field");
      String reCaptchaResponse = ParamUtils.getParameter(request, "recaptcha_response_field");

      RegistrationPlugin plugin =
          (RegistrationPlugin)
              webManager.getXMPPServer().getPluginManager().getPlugin("registration");
      ReCaptcha reCaptcha = null;
      if (plugin.reCaptchaEnabled()) {
        reCaptcha =
            ReCaptchaFactory.newReCaptcha(
                plugin.getReCaptchaPublicKey(),
                plugin.getReCaptchaPrivateKey(),
                plugin.reCaptchaNoScript());
      }

      // Handle a request to create a user:
      if (create) {
        // Validate
        if (username == null) {
          errors.put("username", "");
        } else {
          try {
            username = username.trim().toLowerCase();
            username = JID.escapeNode(username);
            username = Stringprep.nodeprep(username);
          } catch (StringprepException se) {
            errors.put("username", "");
          }
        }
        if (password == null) {
          errors.put("password", "");
        }
        if (passwordConfirm == null) {
          errors.put("passwordConfirm", "");
        }
        if (password != null && passwordConfirm != null && !password.equals(passwordConfirm)) {
          errors.put("passwordMatch", "");
        }
        if (plugin.reCaptchaEnabled()) {
          ReCaptchaResponse captchaResponse = null;
          try {
            captchaResponse =
                reCaptcha.checkAnswer(
                    request.getRemoteAddr(), reCaptchaChallenge, reCaptchaResponse);
          } catch (Exception e) {
          }
          if (captchaResponse == null || !captchaResponse.isValid()) {
            errors.put("reCaptchaFail", "");
          }
        }

        // do a create if there were no errors
        if (errors.size() == 0) {
          try {
            webManager.getUserManager().createUser(username, password, name, email);

            response.sendRedirect("sign-up.jsp?success=true");
            return;
          } catch (UserAlreadyExistsException e) {
            errors.put("usernameAlreadyExists", "");
          } catch (Exception e) {
            errors.put("general", "");
            Log.error(e);
          }
        }
      }

      out.write(
          "\n\n<body>\n\n<div id=\"jive-header\">\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\">\n    <tbody>\n        <tr><td class=\"drop-shadow\">&nbsp;");
      out.print(plugin.getHeader());
      out.write("</td></tr>    \n    </tbody>\n</table>\n</div>\n\n<div id=\"jive-content\">\n\n");
      if (!plugin.webEnabled()) {
        out.write('\n');
        out.write('\n');
        if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
        out.write('\n');
        out.write('\n');
      } else {
        out.write("\n\n<p>");
        if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
        out.write("</p>\n\n");
        if (_jspx_meth_c_set_0(_jspx_page_context)) return;
        out.write('\n');
        if (_jspx_meth_c_set_1(_jspx_page_context)) return;
        out.write('\n');
        out.write('\n');
        if (!errors.isEmpty()) {
          out.write(
              "\n\n    <div class=\"jive-error\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"/></td>\n            <td class=\"jive-icon-label\">\n\n            ");
          if (errors.get("general") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("username") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("usernameAlreadyExists") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("name") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_6(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("email") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_7(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("password") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_8(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("passwordMatch") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_9(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("passwordConfirm") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_10(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("reCaptchaFail") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_11(_jspx_page_context)) return;
            out.write("\n            ");
          }
          out.write(
              "\n            </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n    <br>\n\n");
        } else if (request.getParameter("success") != null) {
          out.write(
              "\n\n    <div class=\"jive-success\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\n            <td class=\"jive-icon-label\">");
          if (_jspx_meth_fmt_message_12(_jspx_page_context)) return;
          out.write("</td>\n        </tr>\n    </tbody>\n    </table>\n    </div><br>\n\n");
        }
        out.write(
            "\n\n<form name=\"f\" action=\"sign-up.jsp\" method=\"get\">\n\n<div class=\"jive-contentBoxHeader\">");
        if (_jspx_meth_fmt_message_13(_jspx_page_context)) return;
        out.write(
            "</div>\n<div class=\"jive-contentBox\">\n    <div>\n    <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n    <tbody>\n    <tr>\n        <td width=\"1%\" nowrap><label for=\"usernametf\">");
        if (_jspx_meth_fmt_message_14(_jspx_page_context)) return;
        out.write(
            ":</label> *</td>\n        <td width=\"99%\">\n            <input type=\"text\" name=\"username\" size=\"30\" maxlength=\"75\" value=\"");
        out.print(((username != null) ? username : ""));
        out.write(
            "\"\n             id=\"usernametf\" autocomplete=\"off\">\n        </td>\n    </tr>\n    <tr>\n        <td width=\"1%\" nowrap>\n            <label for=\"nametf\">");
        if (_jspx_meth_fmt_message_15(_jspx_page_context)) return;
        out.write(
            ":</label>\n        </td>\n        <td width=\"99%\">\n            <input type=\"text\" name=\"name\" size=\"30\" maxlength=\"75\" value=\"");
        out.print(((name != null) ? name : ""));
        out.write(
            "\"\n             id=\"nametf\">\n        </td>\n    </tr>\n    <tr>\n        <td width=\"1%\" nowrap>\n            <label for=\"emailtf\">");
        if (_jspx_meth_fmt_message_16(_jspx_page_context)) return;
        out.write(
            ":</label></td>\n        <td width=\"99%\">\n            <input type=\"text\" name=\"email\" size=\"30\" maxlength=\"75\" value=\"");
        out.print(((email != null) ? email : ""));
        out.write(
            "\"\n             id=\"emailtf\">\n        </td>\n    </tr>\n    <tr>\n        <td nowrap>\n            <label for=\"passtf\">");
        if (_jspx_meth_fmt_message_17(_jspx_page_context)) return;
        out.write(
            ":</label> *\n        </td>\n        <td width=\"99%\">\n            <input type=\"password\" name=\"password\" value=\"\" size=\"20\" maxlength=\"75\"\n             id=\"passtf\">\n        </td>\n    </tr>\n    <tr>\n        <td width=\"1%\" nowrap>\n            <label for=\"confpasstf\">");
        if (_jspx_meth_fmt_message_18(_jspx_page_context)) return;
        out.write(
            ":</label> *\n        </td>\n        <td width=\"99%\">\n            <input type=\"password\" name=\"passwordConfirm\" value=\"\" size=\"20\" maxlength=\"75\"\n             id=\"confpasstf\">\n        </td>\n    </tr>\n    </tbody>\n    </table>\n    <br>\n    <span class=\"jive-description\">\n    * ");
        if (_jspx_meth_fmt_message_19(_jspx_page_context)) return;
        out.write("\n    </span>\n    </div>\n</div>\n\n");
        if (reCaptcha != null) {
          out.write('\n');
          out.print(reCaptcha.createRecaptchaHtml(null, null, 0));
          out.write('\n');
        }
        out.write("\n<input type=\"submit\" name=\"create\" value=\"");
        if (_jspx_meth_fmt_message_20(_jspx_page_context)) return;
        out.write(
            "\">\n\n</form>\n\n<script language=\"JavaScript\" type=\"text/javascript\">\ndocument.f.username.focus();\n</script>\n\n");
      }
      out.write("\n\n</body>\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html;charset=ISO-8859-9");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write('\n');
      facade.FormFacade fac = null;
      synchronized (_jspx_page_context) {
        fac = (facade.FormFacade) _jspx_page_context.getAttribute("fac", PageContext.PAGE_SCOPE);
        if (fac == null) {
          fac = new facade.FormFacade();
          _jspx_page_context.setAttribute("fac", fac, PageContext.PAGE_SCOPE);
        }
      }
      out.write("\n");
      out.write("<!DOCTYPE html>\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("    <head>\n");
      out.write(
          "        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("        <title>Confirmação da Inscrição do Candidato</title>\n");
      out.write("    </head>\n");
      out.write("    <body>\n");
      out.write("        <h1>Resultado da Inscrição</h1>\n");
      out.write("        <hr>\n");
      out.write("        <h2>");
      out.print(fac.atualizarCliente(request));
      out.write("</h2>\n");
      out.write("        <br>\n");
      out.write("        <br>\n");
      out.write("        [<a href=\"index.jsp\">      Voltar para pagina inicial </a>]\n");
      out.write("    </body>\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n\n\n\n\n\n\n\n\n\n\n");
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');

      webManager.init(request, response, session, application, out);
      DBManager dbManager = DBManager.getInstance();
      Iterator<User> users = webManager.getUserManager().getUsers().iterator();

      Msn msn = null;
      // Get Action
      boolean create = request.getParameter("create") != null;
      boolean cancel = request.getParameter("cancel") != null;

      // Get data

      Map<String, String> errors = new HashMap<String, String>();

      if (cancel) {
        String user = request.getParameter("user");
        if (user != null & !"".equals(user)) {
          response.sendRedirect("pf-main.jsp?user="******"pf-main.jsp");
        }
        return;
      }
      if (create) {
        String input_jid = null;
        try {
          input_jid = request.getParameter("jid");
          String input_msn = request.getParameter("msn");
          String input_enable = request.getParameter("enable");
          if (input_jid == null || "".equals(input_jid)) {
            errors.put("add_msn_error", "jid can not be null");
          }

          if (input_msn == null || "".equals(input_msn)) {
            errors.put("add_msn_error", "msn can not be null");
          }

          int enable = 0;
          if (input_enable == null) {
            enable = 0;
          } else {
            enable = 1;
          }

          dbManager.addMsn(input_jid, input_msn, enable);
        } catch (Exception e) {
          Log.error(e);
          errors.put("add_msn_error", e.getLocalizedMessage());
        }
        if (errors.isEmpty()) {
          response.sendRedirect("pf-main.jsp?user="******"\n<html>\n<head>\n    <title>\n        ");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "\n\n    </title>\n    <meta name=\"pageID\" content=\"addMsn\"/>\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"scripts/packetfilter.js\"></script>\n</head>\n<body>\n\n");
      if (!errors.isEmpty()) {
        out.write(
            "\n\n<div class=\"jive-error\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n        <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"/images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"/></td>\n            <td class=\"jive-icon-label\">\n\n                ");
        if (errors.get("add_msn_error") != null) {
          out.write("\n                ");
          out.print(errors.get("add_msn_error"));
          out.write("\n                ");
        }
        out.write(
            "\n            </td>\n        </tr>\n        </tbody>\n    </table>\n</div>\n<br>\n\n");
      }
      out.write(
          "\n\n<form action=\"msn-form.jsp\" method=\"get\">\n    <div class=\"jive-table\">\n        <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n            <tbody>\n            <tr class=\"jive-even\">\n                <td>JID</td>\n                <td>\n                    <select name=\"jid\" id=\"jid\">\n                        ");

      if (users != null) {
        while (users.hasNext()) {
          User user = users.next();
          out.write("\n                            <option value=\"");
          out.print(user.getUsername());
          out.write('"');
          out.write('>');
          out.print(user.getUsername());
          out.write("</option>\n                        ");
        }
      }

      out.write("\n                    </select>\n\n\n                   ");
      // <input type="text" name="jid" value="" size="40"/>
      out.write(
          "\n                </td>\n            </tr>\n            <tr class=\"jive-odd\">\n                <td>Msn</td>\n                <td>\n                    <input type=\"text\" name=\"msn\" value=\"\" size=\"40\"/>\n                </td>\n\n            </tr>\n            <tr class=\"jive-even\">\n                <td>Enable</td>\n                <td>\n                    <input type=\"checkbox\" name=\"enable\" value=\"true\" checked>\n                </td>\n\n            </tr>\n\n\n            <tr>\n                <td>\n                    <input type=\"submit\" name=\"create\" value=\"");
      if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
      out.write("\">\n                    <input type=\"submit\" name=\"cancel\" value=\"");
      if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
      out.write(
          "\">\n                </td>\n                <td>&nbsp;</td>\n            </tr>\n            </tbody>\n        </table>\n\n    </div>\n</form>\n\n</body>\n</html>\n\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #15
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n");
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');

      webManager.init(request, response, session, application, out);
      boolean save = request.getParameter("save") != null;
      boolean success = request.getParameter("success") != null;
      String persistentRosterParam = request.getParameter("persistentEnabled");
      boolean persistentRoster =
          persistentRosterParam == null ? false : persistentRosterParam.equals("true");

      String ignoreSubdomainsParam = request.getParameter("ignoreSubdomains");
      boolean ignnoreSubdomains =
          ignoreSubdomainsParam == null ? false : ignoreSubdomainsParam.equals("true");
      String blockPresencesParam = request.getParameter("blockPresences");
      boolean blockPresences =
          blockPresencesParam == null ? false : blockPresencesParam.equals("true");

      String sparkdiscoParam = request.getParameter("sparkDiscoInfo");
      boolean sparkDiscoInfo = sparkdiscoParam == null ? false : sparkdiscoParam.equals("true");

      String iqLastFilterPram = request.getParameter("iqLastFilter");
      boolean iqLastFilter = iqLastFilterPram == null ? false : iqLastFilterPram.equals("true");

      String mucFilterParam = request.getParameter("mucFilter");
      boolean mucFilter = mucFilterParam == null ? false : mucFilterParam.equals("true");

      String gajimBroadcastParam = request.getParameter("gajimBroadcast");
      boolean gajimBroadcast =
          gajimBroadcastParam == null ? false : gajimBroadcastParam.equals("true");

      String[] componentsEnabled = request.getParameterValues("enabledComponents[]");
      PermissionManager _pmanager = new PermissionManager();
      DatabaseManager _db;

      Map<String, String> errors = new HashMap<String, String>();
      if (save) {
        for (String property : JiveGlobals.getPropertyNames("plugin.remoteroster.jids")) {
          JiveGlobals.deleteProperty(property);
        }
        if (componentsEnabled != null) {
          for (int i = 0; i < componentsEnabled.length; i++) {
            JiveGlobals.setProperty("plugin.remoteroster.jids." + componentsEnabled[i], "true");
            String group = request.getParameter("input_group." + componentsEnabled[i]);
            if (group != null) {
              _pmanager.setGroupForGateway(componentsEnabled[i], group);
            }
          }
        }
        JiveGlobals.setProperty(
            "plugin.remoteroster.persistent", (persistentRoster ? "true" : "false"));
        JiveGlobals.setProperty(
            "plugin.remoteroster.blockPresences", (blockPresences ? "true" : "false"));
        JiveGlobals.setProperty(
            "plugin.remoteroster.sparkDiscoInfo", (sparkDiscoInfo ? "true" : "false"));
        JiveGlobals.setProperty(
            "plugin.remoteroster.iqLastFilter", (iqLastFilter ? "true" : "false"));
        JiveGlobals.setProperty("plugin.remoteroster.mucFilter", (mucFilter ? "true" : "false"));
        JiveGlobals.setProperty(
            "plugin.remoteroster.gajimBroadcast", (gajimBroadcast ? "true" : "false"));
        JiveGlobals.setProperty(
            "plugin.remoteroster.ignoreSubdomains", (ignnoreSubdomains ? "true" : "false"));
        response.sendRedirect("rr-main.jsp?success=true");
        return;
      }

      // Get the session manager
      SessionManager sessionManager = webManager.getSessionManager();

      Collection<ComponentSession> sessions = sessionManager.getComponentSessions();

      _db = DatabaseManager.getInstance();

      out.write(
          "\r\n\r\n<html>\r\n<head>\r\n<title>Gojara Settings</title>\r\n<link href=\"./css/rr.css\" rel=\"stylesheet\" type=\"text/css\">\r\n<script src=\"./js/http.js\" type=\"text/javascript\"></script>\r\n<script src=\"./js/jquery.js\" type=\"text/javascript\"></script>\r\n<script src=\"./js/rr.js\" type=\"text/javascript\"></script>\r\n<script src=\"./js/jquery.sparkline.js\" type=\"text/javascript\"></script>\r\n<script src=\"./js/jquery.horiz-bar-graph.js\" type=\"text/javascript\"></script>\r\n<!--[if lte IE 8]><script language=\"javascript\" type=\"text/javascript\" src=\"./js/excanvas.min.js\"></script><![endif]-->\r\n<script language=\"javascript\" type=\"text/javascript\" src=\"./js/jquery.flot.js\"></script>\r\n<script language=\"javascript\" type=\"text/javascript\" src=\"./js/jquery.flot.pie.js\"></script>\r\n\r\n<meta name=\"pageID\" content=\"remoteRoster\" />\r\n<meta name=\"helpPage\" content=\"\" />\r\n\r\n</head>\r\n<body>\r\n\r\n\t<p>Any components configured here will allow the external component associated with them full control over their\r\n\t\tdomain within any user's roster. Before enabling Remote Roster Management support for an external component, first\r\n");
      out.write(
          "\t\tconnect it like you would any external component. Once it has connected and registered with Openfire, it's JID should\r\n\t\tshow up below and you can enable Remote Roster support.</p>\r\n\r\n\t");

      if (success) {

        out.write(
            "\r\n\r\n\t<div class=\"jive-success\">\r\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\r\n\t\t\t\t\t<td class=\"jive-icon-label\">Settings saved!</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t</div>\r\n\t<br>\r\n\r\n\t");

      } else if (errors.size() > 0) {

        out.write(
            "\r\n\r\n\t<div class=\"jive-error\">\r\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\r\n\t\t\t\t\t<td class=\"jive-icon-label\">Error saving settings!</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t</div>\r\n\t<br>\r\n\r\n\t");
      }

      out.write(
          "\r\n\r\n\t<form action=\"rr-main.jsp?save\" method=\"post\">\r\n\r\n\t\t<div class=\"jive-contentBoxHeader\">Connected Gateway Components</div>\r\n\t\t<div class=\"jive-contentBox\">\r\n\r\n\t\t\t<p>Select which components you want to enable remote roster on:</p>\r\n\t\t\t");

      boolean gatewayFound = false;
      int i = 0;
      for (ComponentSession componentSession : sessions) {
        if (!componentSession.getExternalComponent().getCategory().equals("gateway")) {
          continue;
        }
        gatewayFound = true;

        long incoming = componentSession.getNumClientPackets();
        long outgoing = componentSession.getNumServerPackets();
        long both = incoming + outgoing;
        int incomingPercent = (int) (incoming * 100 / both);
        int outgoingPercent = (int) (outgoing * 100 / both);

        out.write(
            "\r\n\t\t\t<table class=\"gatewayHeader\">\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"gatewayCheckbox\"><input type=\"checkbox\" name=\"enabledComponents[]\"\r\n\t\t\t\t\t\t\tvalue=\"");
        out.print(componentSession.getExternalComponent().getInitialSubdomain());
        out.write("\"\r\n\t\t\t\t\t\t\t");
        out.print(
            JiveGlobals.getBooleanProperty(
                    "plugin.remoteroster.jids."
                        + componentSession.getExternalComponent().getInitialSubdomain(),
                    false)
                ? "checked=\"checked\""
                : "");
        out.write(" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"gatewayName\">");
        out.print(componentSession.getExternalComponent().getName());
        out.write(
            "</td>\r\n\t\t\t\t\t\t<td class=\"gatewayIcons\"><img src=\"images/log-16x16.png\" onclick=\"slideToggle('#logs");
        out.print(i);
        out.write(
            "')\"><img\r\n\t\t\t\t\t\t\tsrc=\"images/permissions-16x16.png\" id=\"showPermissions\" onclick=\"slideToggle('#permission");
        out.print(i);
        out.write(
            "')\"><img\r\n\t\t\t\t\t\t\tsrc=\"images/info-16x16.png\" id=\"showConfig\" onclick=\"slideToggle('#config");
        out.print(i);
        out.write(
            "')\"></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t\t<div id=\"config");
        out.print(i);
        out.write(
            "\" class=\"slider\">\r\n\t\t\t\t<div class=\"sildeHeader\">Information</div>\r\n\t\t\t\t<table class=\"configTable\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr id=\"logodd\">\r\n\t\t\t\t\t\t\t<td width=\"200px\">Domain:</td>\r\n\t\t\t\t\t\t\t<td>");
        out.print(componentSession.getExternalComponent().getInitialSubdomain());
        out.write(
            "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logeven\">\r\n\t\t\t\t\t\t\t<td>Status:</td>\r\n\t\t\t\t\t\t\t<td>Online</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logodd\">\r\n\t\t\t\t\t\t\t<td>Packages Send/Received:</td>\r\n\t\t\t\t\t\t\t<td><dl class=\"browser-data\" title=\"\">\r\n\t\t\t\t\t\t\t\t\t<dt>Incoming</dt>\r\n\t\t\t\t\t\t\t\t\t<dd>");
        out.print(incomingPercent);
        out.write("</dd>\r\n\t\t\t\t\t\t\t\t\t<dt>Outgoing</dt>\r\n\t\t\t\t\t\t\t\t\t<dd>");
        out.print(outgoingPercent);
        out.write(
            "</dd>\r\n\t\t\t\t\t\t\t\t</dl></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"permission");
        out.print(i);
        out.write(
            "\" class=\"slider\">\r\n\t\t\t\t<div class=\"sildeHeader\">Access control</div>\r\n\t\t\t\t<table class=\"groupTable\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr id=\"loghead\">\r\n\t\t\t\t\t\t\t<td colspan=\"3\">You can limit the access to the external component to an existing group</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 class=\"permissionTableColumn\">Groupname:</td>\r\n\t\t\t\t\t\t\t<td><input class=\"groupInput\" type=\"text\" id=\"groupSearch");
        out.print(i);
        out.write("\"\r\n\t\t\t\t\t\t\t\tname=\"input_group.");
        out.print(componentSession.getExternalComponent().getInitialSubdomain());
        out.write("\" alt=\"Find Groups\"\r\n\t\t\t\t\t\t\t\tonkeyup=\"searchSuggest('");
        out.print(i);
        out.write("');\" autocomplete=\"off\"\r\n\t\t\t\t\t\t\t\tvalue=\"");
        out.print(
            _pmanager.getGroupForGateway(
                componentSession.getExternalComponent().getInitialSubdomain()));
        out.write("\">\r\n\t\t\t\t\t\t\t\t<div id=\"search_suggest");
        out.print(i);
        out.write(
            "\"></div></td>\r\n\t\t\t\t\t\t\t<td style=\"vertical-align: top;\">\r\n\t\t\t\t\t\t\t\t<div class=\"ajaxloading\" id=\"ajaxloading");
        out.print(i);
        out.write(
            "\"></div>\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</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"logs");
        out.print(i);
        out.write("\" class=\"slider\">\r\n\t\t\t\t");

        int iqs =
            _db.getPacketCount(
                componentSession.getExternalComponent().getInitialSubdomain(),
                Class.forName("org.xmpp.packet.IQ"));
        int msgs =
            _db.getPacketCount(
                componentSession.getExternalComponent().getInitialSubdomain(),
                Class.forName("org.xmpp.packet.Message"));
        int rosters =
            _db.getPacketCount(
                componentSession.getExternalComponent().getInitialSubdomain(),
                Class.forName("org.xmpp.packet.Roster"));
        int presences =
            _db.getPacketCount(
                componentSession.getExternalComponent().getInitialSubdomain(),
                Class.forName("org.xmpp.packet.Presence"));

        out.write(
            "\r\n\t\t\t\t<div class=\"sildeHeader\">Logs & Statistics</div>\r\n\r\n\t\t\t\t<table class=\"logtable\">\r\n\t\t\t\t\t<tfoot>\r\n\t\t\t\t\t\t<tr id=\"logfoot\">\r\n\t\t\t\t\t\t\t<td colspan=\"2\">Packages being logged for ");
        out.print(JiveGlobals.getIntProperty("plugin.remoteroster.log.cleaner.minutes", 60));
        out.write(
            "\r\n\t\t\t\t\t\t\t\tminutes\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td><a style=\"float: right;\"\r\n\t\t\t\t\t\t\t\tonClick=\"window.open('liveStats.jsp?component=");
        out.print(componentSession.getExternalComponent().getInitialSubdomain());
        out.write(
            "','mywindow','width=1200,height=700')\">Show\r\n\t\t\t\t\t\t\t\t\trealtime Log</a>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tfoot>\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr id=\"loghead\">\r\n\t\t\t\t\t\t\t<td width=\"200px\">Paket type</td>\r\n\t\t\t\t\t\t\t<td width=\"100px\">Number</td>\r\n\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logodd\">\r\n\t\t\t\t\t\t\t<td>IQ</td>\r\n\t\t\t\t\t\t\t<td id=\"logiq");
        out.print(i);
        out.write('"');
        out.write('>');
        out.print(iqs);
        out.write("</td>\r\n\t\t\t\t\t\t\t<td rowspan=\"5\"><div id=\"pie");
        out.print(i);
        out.write(
            "\" class=\"graph\"></div></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logeven\">\r\n\t\t\t\t\t\t\t<td>Messages</td>\r\n\t\t\t\t\t\t\t<td id=\"logmsg");
        out.print(i);
        out.write('"');
        out.write('>');
        out.print(msgs);
        out.write(
            "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logodd\">\r\n\t\t\t\t\t\t\t<td>Roster</td>\r\n\t\t\t\t\t\t\t<td id=\"logroster");
        out.print(i);
        out.write('"');
        out.write('>');
        out.print(rosters);
        out.write(
            "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logeven\">\r\n\t\t\t\t\t\t\t<td>Presence</td>\r\n\t\t\t\t\t\t\t<td id=\"logpresence");
        out.print(i);
        out.write('"');
        out.write('>');
        out.print(presences);
        out.write(
            "</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr id=\"logodd\">\r\n\t\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">Total:</span></td>\r\n\t\t\t\t\t\t\t<td><span style=\"font-weight: bold;\">");
        out.print(iqs + msgs + rosters + presences);
        out.write(
            "</span></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\r\n\t\t\t</div>\r\n\r\n\r\n\t\t\t");

        ++i;
      }

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

      if (!gatewayFound) {

        out.write(
            "\r\n\t\t\t<span style=\"font-weight: bold\">No connected external gateway components found.</span>\r\n\t\t\t");
      }

      out.write(
          "\r\n\t\t</div>\r\n\t\t\r\n\t\t\r\n<div class=\"jive-contentBoxHeader\">General Options</div>\r\n<div class=\"jive-contentBox\">\r\n   <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n   <tbody>\r\n   <tr valign=\"top\">\r\n       <td width=\"100%\">\r\n           <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n           <tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td><input type=\"checkbox\" name=\"persistentEnabled\" id=\"GO1\" value=\"true\"\r\n\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.persistent", false)
              ? "checked=\"checked\""
              : "");
      out.write(
          " />\r\n\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td><label for=\"GO1\">Enable persistent Roster</label></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td />\r\n\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">When Persistent-Roster is enabled, contacts will be saved to database and\r\n\t\t\t\t\tno contacts will be deleted\tby GoJara automatically.<br>\t\t\t\t\t\r\n\t\t\t\t\tWhen Persistent-Roster is disabled, contacts will not be saved to database and \r\n\t\t\t\t\tGoJara will automatically delete all Legacy-RosterItems from the OF-Roster of a User upon logout.<br>Enable this if you want to store Gateway contacts in DB. </td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td><input type=\"checkbox\" name=\"mucFilter\" id=\"GO2\" value=\"true\"\r\n\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.mucFilter", false)
              ? "checked=\"checked\""
              : "");
      out.write(
          " />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td><label for=\"GO2\">Only allow internal Jabber Conferences</label></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td />\r\n\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">Spectrum might add MUC(Multi User Chat) to supported features\r\n\t\t\t\t\t of some Transports. If this should not be allowed, because only internal Jabber Conferences should be used, GoJara\r\n\t\t\t\t\t can remove these.</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td><input type=\"checkbox\" name=\"ignoreSubdomains\" id=\"GO3\" value=\"true\"\r\n\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.ignoreSubdomains", true)
              ? "checked=\"checked\""
              : "");
      out.write(
          " />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td><label for=\"GO2\">Do not add Subdomains to Roster</label></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td />\r\n\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">If you do not want the gateway itself to show up as a contact on your roster,\r\n\t\t\t\t\tenable this (only happens on registration).\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\r\n           </tbody>\r\n           </table>\r\n       </td>\r\n   </tr>\r\n   </tbody>\r\n   </table>\r\n</div>\r\n\r\n\t\t<br /> <br />\r\n\t\t<div class=\"jive-contentBoxHeader\">Client specific options</div>\r\n\t\t<div class=\"jive-contentBox\">\r\n\t\t\t<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr valign=\"top\">\r\n\t\t\t\t\t\t<td width=\"1%\" nowrap class=\"c1\">Spark:</td>\r\n\t\t\t\t\t\t<td width=\"99%\">\r\n\t\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t\t\t\t\t<tbody>\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><input type=\"checkbox\" name=\"sparkDiscoInfo\" id=\"SDI\" value=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.sparkDiscoInfo", false)
              ? "checked=\"checked\""
              : "");
      out.write(
          " />\r\n\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><label for=\"SDI\"> Support jabber:iq:registered feature</label></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 />\r\n\t\t\t\t\t\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">If you use Spark clients within your network, it\r\n\t\t\t\t\t\t\t\t\t\t\tmight be necessary to modify the service discovery packets between Spark and the external component. If you\r\n\t\t\t\t\t\t\t\t\t\t\tcheck this RemoteRoster will add the feature \"jabber:iq:registered\" to the disco#info to indicate that the\r\n\t\t\t\t\t\t\t\t\t\t\tClient is registered with the external component.</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><input type=\"checkbox\" name=\"iqLastFilter\" id=\"SDI2\" value=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.iqLastFilter", false)
              ? "checked=\"checked\""
              : "");
      out.write(
          " />\r\n\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><label for=\"SDI\">Reply to jabber:iq:last </label></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 />\r\n\t\t\t\t\t\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">Some clients try to check how long a contact is already offline.\r\n\t\t\t\t\t\t\t\t\t\t This feature is not supported by spectrum so it won't response to this IQ stanza. To prevent the client from waiting\r\n\t\t\t\t\t\t\t\t\t\t for a response we could answer with a service-unavailable message as described in XEP-12.</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\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><input type=\"checkbox\" name=\"blockPresences\" id=\"SDI3\" value=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.blockPresences", true)
              ? "checked=\"checked\""
              : "");
      out.write(
          " />\r\n\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><label for=\"SDI\">Block presence pushing to rosterItems except gateway</label></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 />\r\n\t\t\t\t\t\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">Openfire automatically pushes Presences to every Item on your Roster.\r\n\t\t\t\t\t\t\t\t\t\tFor Spark, this means that roster items which are imported through gateway will trigger automatic login, even if you configured\r\n\t\t\t\t\t\t\t\t\t\tSpark to not connect to these gateways on Startup.<br>\r\n\t\t\t\t\t\t\t\t\t\tBlock Presences if you use Spark and do not want to autoconnect.</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr valign=\"top\">\r\n\t\t\t\t\t\t<td width=\"1%\" nowrap class=\"c1\">Gajim:</td>\r\n\t\t\t\t\t\t<td width=\"99%\">\r\n\t\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t\t\t\t\t<tbody>\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><input type=\"checkbox\" name=\"gajimBroadcast\" id=\"gajimBroadcast\" value=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t");
      out.print(
          JiveGlobals.getBooleanProperty("plugin.remoteroster.gajimBroadcast", false)
              ? "checked=\"checked\""
              : "");
      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><label for=\"gajimBroadcast\">Push available presence on startup</label></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 />\r\n\t\t\t\t\t\t\t\t\t\t<td align=\"left\" style=\"font-size: -3; color: grey\">Enable this if Gojara should push available presences to\r\n\t\t\t\t\t\t\t\t\t\ttransports from your roster on startup. If disabled, you may have to manually send an available presence to the specific \r\n\t\t\t\t\t\t\t\t\t\ttransport to connect to it.<br>Not needed if you add Subdomains to roster + disabled presence blocking.</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\r\n\r\n\t\t<input type=\"submit\" name=\"save\" value=\"Save Settings\" />\r\n\t</form>\r\n\r\n</body>\r\n</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #16
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n\n\n\n\n");
      org.jivesoftware.admin.AdminPageBean pageinfo = null;
      synchronized (request) {
        pageinfo =
            (org.jivesoftware.admin.AdminPageBean)
                _jspx_page_context.getAttribute("pageinfo", PageContext.REQUEST_SCOPE);
        if (pageinfo == null) {
          pageinfo = new org.jivesoftware.admin.AdminPageBean();
          _jspx_page_context.setAttribute("pageinfo", pageinfo, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\n');
      out.write('\n');
      out.write('\n');
      out.write('\n');

      // Get parameters
      String log = ParamUtils.getParameter(request, "log");
      String numLinesParam = ParamUtils.getParameter(request, "lines");
      int numLines = ParamUtils.getIntParameter(request, "lines", 50);
      String mode = ParamUtils.getParameter(request, "mode");

      // Only allow requests for valid log file names.
      if (!("debug".equals(log)
          || "warn".equals(log)
          || "info".equals(log)
          || "error".equals(log))) {
        log = null;
      }

      // Set defaults
      if (log == null) {
        log = "error";
      }
      if (mode == null) {
        mode = "asc";
      }
      if (numLinesParam == null) {
        numLinesParam = "50";
      }

      // Other vars
      File logDir = new File(Log.getLogDirectory());
      String filename = log + ".log";
      File logFile = new File(logDir, filename);

      String lines[] = new String[0];
      int start = 0;
      try {
        BufferedReader in =
            new BufferedReader(new InputStreamReader(new FileInputStream(logFile), "UTF-8"));
        String line;
        int totalNumLines = 0;
        while ((line = in.readLine()) != null) {
          totalNumLines++;
        }
        in.close();
        // adjust the 'numLines' var to match totalNumLines if 'all' was passed in:
        if ("All".equals(numLinesParam)) {
          numLines = totalNumLines;
        }
        lines = new String[numLines];
        in = new BufferedReader(new InputStreamReader(new FileInputStream(logFile), "UTF-8"));
        // skip lines
        start = totalNumLines - numLines;
        if (start < 0) {
          start = 0;
        }
        for (int i = 0; i < start; i++) {
          in.readLine();
        }
        int i = 0;
        if ("asc".equals(mode)) {
          while ((line = in.readLine()) != null && i < numLines) {
            line = StringUtils.escapeHTMLTags(line);
            line = parseDate(line);
            line = hilite(line);
            lines[i] = line;
            i++;
          }
        } else {
          int end = lines.length - 1;
          while ((line = in.readLine()) != null && i < numLines) {
            line = StringUtils.escapeHTMLTags(line);
            line = parseDate(line);
            line = hilite(line);
            lines[end - i] = line;
            i++;
          }
        }
        numLines = start + i;
      } catch (FileNotFoundException ex) {
        Log.info("Could not open (log)file.", ex);
      }

      out.write("\n\n<html>\n<head>\n    <title>");
      out.print(log);
      out.write(
          "</title>\n    <meta name=\"decorator\" content=\"none\"/>\n    <style type=\"text/css\">\n    .log TABLE {\n        border : 1px #ccc solid;\n    }\n    .log TH {\n        font-family : verdana, arial, sans-serif;\n        font-weight : bold;\n        font-size : 8pt;\n    }\n    .log TR TH {\n        background-color : #ddd;\n        border-bottom : 1px #ccc solid;\n        padding-left : 2px;\n        padding-right : 2px;\n        text-align : left;\n    }\n    .log .head-num {\n        border-right : 1px #ccc solid;\n    }\n    .log TD {\n        font-family : courier new,monospace;\n        font-size : 9pt;\n        background-color : #ffe;\n    }\n    .log .num {\n        width : 1%;\n        background-color : #eee !important;\n        border-right : 1px #ccc solid;\n        padding-left : 2px;\n        padding-right : 2px;\n    }\n    .log .line {\n        padding-left : 10px;\n    }\n    .hilite {\n        color : #900;\n    }\n    .hilite-marker {\n        background-color : #ff0;\n        color : #000;\n        font-weight : bold;\n    }\n    </style>\n");
      out.write(
          "</head>\n<body>\n\n<div class=\"log\">\n<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n<tr>\n    <th class=\"head-num\">");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</th>\n    <th>&nbsp;</th>\n</tr>\n<tr>\n    <td width=\"1%\" nowrap class=\"num\">\n        ");
      if ("asc".equals(mode)) {
        out.write("\n            ");
        for (int j = start + 1; j <= numLines; j++) {
          out.write("\n                ");
          out.print(j);
          out.write("<br>\n            ");
        }
        out.write("\n        ");
      } else {
        out.write("\n            ");
        for (int j = numLines; j >= start + 1; j--) {
          out.write("\n                ");
          out.print(j);
          out.write("<br>\n            ");
        }
        out.write("\n        ");
      }
      out.write("\n    </td>\n    <td width=\"99%\" class=\"line\">\n        ");
      for (String line1 : lines) {
        if (line1 != null) {

          out.write("\n        <nobr>");
          out.print(line1);
          out.write("\n        </nobr>\n        <br>\n\n        ");
        }
      }

      out.write("\n    </td>\n</tr>\n</table>\n</div>\n\n</body>\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #17
0
  public void _jspService(
      final javax.servlet.http.HttpServletRequest request,
      final javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

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

      out.write("\n");
      out.write("     \n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");

      request.setCharacterEncoding("euc-kr");

      out.write('\n');
      guestModel.GuestDto guest = null;
      guest =
          (guestModel.GuestDto)
              _jspx_page_context.getAttribute("guest", javax.servlet.jsp.PageContext.PAGE_SCOPE);
      if (guest == null) {
        guest = new guestModel.GuestDto();
        _jspx_page_context.setAttribute("guest", guest, javax.servlet.jsp.PageContext.PAGE_SCOPE);
      }
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.introspect(
          _jspx_page_context.findAttribute("guest"), request);
      out.write('\n');

      int num = Integer.parseInt(request.getParameter("num"));
      out.print("num" + num);
      int check = GuestDao.getInstance().delete(guest.getNum());
      out.print("check:" + check);

      out.write("\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("<title>Insert title here</title>\n");
      out.write("</head>\n");
      out.write("<body>\n");
      out.write("\t");
      if (check > 0) {
        out.write("\n");
        out.write("\t\t<script type=\"text/javascript\">\n");
        out.write("\t\t\talert(\"삭제되었습니다.\");\n");
        out.write("\t\t\tlocation.href=\"write.jsp\";\n");
        out.write("\t\t</script>\n");
        out.write("\t\n");
        out.write("\t");
      } else {
        out.write("\n");
        out.write("\t\t<script type=\"text/javascript\">\n");
        out.write("\t\t\talert(\"삭제 실패.\");\n");
        out.write("\t\t\tlocation.href=\"write.jsp\";\n");
        out.write("\t\t</script>\n");
        out.write("\t");
      }
      out.write("\n");
      out.write("\t\n");
      out.write("\t\n");
      out.write("</body>\n");
      out.write("</html>");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      depths.presentationModule.RegistrationBean registrationBeanId = null;
      synchronized (session) {
        registrationBeanId =
            (depths.presentationModule.RegistrationBean)
                _jspx_page_context.getAttribute("registrationBeanId", PageContext.SESSION_SCOPE);
        if (registrationBeanId == null) {
          registrationBeanId = new depths.presentationModule.RegistrationBean();
          _jspx_page_context.setAttribute(
              "registrationBeanId", registrationBeanId, PageContext.SESSION_SCOPE);
          out.write('\r');
          out.write('\n');
        }
      }
      out.write("\r\n\r\n");
      out.write("\r\n\r\n");
      out.write("\r\n\r\n");
      userNameExist = registrationBeanId.checkUserName();
      out.write("\r\n\r\n");
      if (userNameExist) {
        out.write("\r\n\r\n");
        response.sendRedirect("registrationForm.jsp");
        out.write("\r\n\r\n");
      } else {
        out.write("\r\n\r\n\r\n");
        dataIsGood = registrationBeanId.checkNewUserData();
        out.write("\r\n\r\n");
        if (dataIsGood == true) {
          out.write("\r\n\r\n\r\n");
          registrationBeanId.newUserRegistration();
          out.write('\r');
          out.write('\n');
          response.sendRedirect("choosingPerformances.jsp");
          out.write("\r\n\r\n ");
        } else {
          out.write("\r\n\r\n\r\n\r\n ");
          response.sendRedirect("optionalRegistrationForm.jsp");
          out.write("\r\n\r\n ");
        }
        out.write('\r');
        out.write('\n');
        out.write(' ');
      }
      out.write('\r');
      out.write('\n');
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  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");
      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\n");
      out.write("\n");
      out.write("<!--");
      out.write("<table border=\"1\">\n    ");
      out.write("<tr>\n        ");
      out.write("<td>\n            ");
      out.write("<u>");
      if (_jspx_meth_fmt_message_0(pageContext)) return;
      out.write("</u>");
      out.write("<br/>");
      out.write("<br/>-->\n            ");
      out.write("<span class=\"error\">");
      if (_jspx_meth_fmt_message_1(pageContext)) return;
      out.write("</span>\n            ");
      out.write("<br/>\n        ");
      out.write("<!--");
      out.write("</td>\n    ");
      out.write("</tr>\n");
      out.write("</table>-->\n\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 empty querygroupresult}");
      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");
          out.write("<table>\n\t");
          /* ----  c:forEach ---- */
          org.apache.taglibs.standard.tag.el.core.ForEachTag _jspx_th_c_forEach_0 =
              (org.apache.taglibs.standard.tag.el.core.ForEachTag)
                  _jspx_tagPool_c_forEach_var_items.get(
                      org.apache.taglibs.standard.tag.el.core.ForEachTag.class);
          _jspx_th_c_forEach_0.setPageContext(pageContext);
          _jspx_th_c_forEach_0.setParent(_jspx_th_c_if_0);
          _jspx_th_c_forEach_0.setItems("${querygroupresult.resultItems}");
          _jspx_th_c_forEach_0.setVar("resultitem");
          int[] _jspx_push_body_count_c_forEach_0 = new int[] {0};
          try {
            int _jspx_eval_c_forEach_0 = _jspx_th_c_forEach_0.doStartTag();
            if (_jspx_eval_c_forEach_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
              do {
                out.write("\n        ");
                out.write("\n            ");
                out.write("\n            ");
                out.write("<tr valign=\"top\">\n                ");
                out.write("<td width=\"60%\">");
                out.write("<b>");
                if (_jspx_meth_fmt_message_2(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write(":");
                out.write("</b>");
                out.write("</td>\n                ");
                out.write("<td width=\"40%\">");
                if (_jspx_meth_c_out_0(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write("</td>\n            ");
                out.write("</tr>\n            \n            ");
                out.write("\n            ");
                out.write("<tr valign=\"top\">\n                ");
                out.write("<td width=\"60%\">");
                out.write("<b>");
                if (_jspx_meth_fmt_message_3(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write(":");
                out.write("</b>");
                out.write("</td>\n                ");
                out.write("<td width=\"40%\">");
                if (_jspx_meth_c_out_1(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write("</td>\n            ");
                out.write("</tr>\n            \n            ");
                out.write("\n            ");
                out.write("<tr valign=\"top\">\n                ");
                out.write("<td width=\"60%\">");
                out.write("<b>");
                if (_jspx_meth_fmt_message_4(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write(":");
                out.write("</b>");
                out.write("</td>\n                ");
                out.write("<td width=\"40%\">");
                if (_jspx_meth_fmt_formatNumber_0(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write("</td>\n            ");
                out.write("</tr>\n            \n            ");
                if (_jspx_meth_c_if_1(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write("\n            \n            ");
                out.write("\n            ");
                out.write("<tr valign=\"top\">\n                ");
                out.write("<td width=\"60%\">");
                out.write("<b>");
                if (_jspx_meth_fmt_message_7(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write("</b>");
                out.write("</td>\n                ");
                out.write("<td width=\"40%\">\n                \t");
                if (_jspx_meth_c_choose_0(
                    _jspx_th_c_forEach_0, pageContext, _jspx_push_body_count_c_forEach_0)) return;
                out.write("\n\n                ");
                out.write("</td>\n            ");
                out.write("</tr>\n          \n");
                out.write("            \n");
                out.write("\n    ");
                int evalDoAfterBody = _jspx_th_c_forEach_0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
              } while (true);
            }
            if (_jspx_th_c_forEach_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
          } catch (Throwable _jspx_exception) {
            while (_jspx_push_body_count_c_forEach_0[0]-- > 0) out = pageContext.popBody();
            _jspx_th_c_forEach_0.doCatch(_jspx_exception);
          } finally {
            _jspx_th_c_forEach_0.doFinally();
            _jspx_tagPool_c_forEach_var_items.reuse(_jspx_th_c_forEach_0);
          }
          out.write("\n");
          out.write("</table>\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\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;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n\n\n\n\n\n\n\n\n");
      out.write('\n');
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      webManager.init(request, response, session, application, out);
      out.write('\n');
      out.write('\n');
      // Get paramters
      boolean doTest = request.getParameter("test") != null;
      boolean cancel = request.getParameter("cancel") != null;
      boolean sent = ParamUtils.getBooleanParameter(request, "sent");
      boolean success = ParamUtils.getBooleanParameter(request, "success");
      String from = ParamUtils.getParameter(request, "from");
      String to = ParamUtils.getParameter(request, "to");
      String subject = ParamUtils.getParameter(request, "subject");
      String body = ParamUtils.getParameter(request, "body");

      // Cancel if requested
      if (cancel) {
        response.sendRedirect("system-email.jsp");
        return;
      }

      // Variable to hold messaging exception, if one occurs
      Exception mex = null;

      // Validate input
      Map<String, String> errors = new HashMap<String, String>();
      if (doTest) {
        if (from == null) {
          errors.put("from", "");
        }
        if (to == null) {
          errors.put("to", "");
        }
        if (subject == null) {
          errors.put("subject", "");
        }
        if (body == null) {
          errors.put("body", "");
        }

        EmailService service = EmailService.getInstance();

        // Validate host - at a minimum, it needs to be set:
        String host = service.getHost();
        if (host == null) {
          errors.put("host", "");
        }

        // if no errors, continue
        if (errors.size() == 0) {
          // Create a message
          MimeMessage message = service.createMimeMessage();
          // Set the date of the message to be the current date
          SimpleDateFormat format =
              new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", java.util.Locale.US);
          format.setTimeZone(JiveGlobals.getTimeZone());
          message.setHeader("Date", format.format(new Date()));

          // Set to and from.
          message.setRecipient(Message.RecipientType.TO, new InternetAddress(to, null));
          message.setFrom(new InternetAddress(from, null));
          message.setSubject(subject);
          message.setText(body);
          // Send the message, wrap in a try/catch:
          try {
            service.sendMessagesImmediately(Collections.singletonList(message));
            // success, so indicate this:
            response.sendRedirect("system-emailtest.jsp?sent=true&success=true");
            return;
          } catch (MessagingException me) {
            me.printStackTrace();
            mex = me;
          }
        }
      }

      // Set var defaults
      Collection<JID> jids = webManager.getXMPPServer().getAdmins();
      User user = null;
      if (!jids.isEmpty()) {
        for (JID jid : jids) {
          if (webManager.getXMPPServer().isLocal(jid)) {
            user = webManager.getUserManager().getUser(jid.getNode());
            if (user.getEmail() != null) {
              break;
            }
          }
        }
      }
      if (from == null) {
        from = user.getEmail();
      }
      if (to == null) {
        to = user.getEmail();
      }
      if (subject == null) {
        subject = "Test email sent via Openfire";
      }
      if (body == null) {
        body = "This is a test message.";
      }

      out.write("\n\n<html>\n    <head>\n        <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</title>\n        <meta name=\"pageID\" content=\"system-email\"/>\n    </head>\n    <body>\n\n<script language=\"JavaScript\" type=\"text/javascript\">\nvar clicked = false;\nfunction checkClick(el) {\n    if (!clicked) {\n        clicked = true;\n        return true;\n    }\n    return false;\n}\n</script>\n\n<p>\n");
      if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
      out.write("\n</p>\n\n");
      if (JiveGlobals.getProperty("mail.smtp.host") == null) {
        out.write(
            "\n\n    <div class=\"jive-error\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n        \t<td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\n\t        <td class=\"jive-icon-label\">\n\t\t        ");
        if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
        out.write("\n\t        </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n\n");
      }
      out.write('\n');
      out.write('\n');
      if (doTest || sent) {
        out.write("\n\n    ");
        if (success) {
          out.write(
              "\n\n        <div class=\"jive-success\">\n        <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n        <tbody>\n            <tr>\n            \t<td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\n            \t<td class=\"jive-icon-label\">");
          if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
          out.write(
              "</td>\n            </tr>\n        </tbody>\n        </table>\n        </div>\n\n    ");
        } else {
          out.write(
              "\n\n        <div class=\"jive-error\">\n        <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n        <tbody>\n            <tr><td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\n            <td class=\"jive-icon-label\">\n                ");
          if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
          out.write("\n                ");
          if (mex != null) {
            out.write("\n                    ");
            if (mex instanceof AuthenticationFailedException) {
              out.write("\n                    \t");
              if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
              out.write("                        \n                    ");
            } else {
              out.write("\n                        (Message: ");
              out.print(mex.getMessage());
              out.write(")\n                    ");
            }
            out.write("\n                ");
          }
          out.write(
              "\n            </td></tr>\n        </tbody>\n        </table>\n        </div>\n\n    ");
        }
        out.write("\n\n    <br>\n\n");
      }
      out.write(
          "\n\n<form action=\"system-emailtest.jsp\" method=\"post\" name=\"f\" onsubmit=\"return checkClick(this);\">\n\n<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\n<tbody>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_6(_jspx_page_context)) return;
      out.write(":\n        </td>\n        <td>\n            ");
      String host = JiveGlobals.getProperty("mail.smtp.host");
      if (host == null) {

        out.write("\n                <i>");
        if (_jspx_meth_fmt_message_7(_jspx_page_context)) return;
        out.write("</i>\n            ");

      } else {

        out.write("\n                ");
        out.print(host);
        out.write(':');
        out.print(JiveGlobals.getIntProperty("mail.smtp.port", 25));
        out.write("\n\n                ");
        if (JiveGlobals.getBooleanProperty("mail.smtp.ssl", false)) {
          out.write("\n\n                    (");
          if (_jspx_meth_fmt_message_8(_jspx_page_context)) return;
          out.write(")\n\n                ");
        }
        out.write("\n            ");
      }
      out.write("\n        </td>\n    </tr>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_9(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <input type=\"hidden\" name=\"from\" value=\"");
      out.print(from);
      out.write("\">\n            ");
      out.print(StringUtils.escapeHTMLTags(from));
      out.write(
          "\n            <span class=\"jive-description\">\n            (<a href=\"user-edit-form.jsp?username="******"\">Update Address</a>)\n            </span>\n        </td>\n    </tr>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_10(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <input type=\"text\" name=\"to\" value=\"");
      out.print(((to != null) ? to : ""));
      out.write(
          "\"\n             size=\"40\" maxlength=\"100\">\n        </td>\n    </tr>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_11(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <input type=\"text\" name=\"subject\" value=\"");
      out.print(((subject != null) ? subject : ""));
      out.write(
          "\"\n             size=\"40\" maxlength=\"100\">\n        </td>\n    </tr>\n    <tr valign=\"top\">\n        <td>\n            ");
      if (_jspx_meth_fmt_message_12(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <textarea name=\"body\" cols=\"45\" rows=\"5\" wrap=\"virtual\">");
      out.print(body);
      out.write(
          "</textarea>\n        </td>\n    </tr>\n    <tr>\n        <td colspan=\"2\">\n            <br>\n            <input type=\"submit\" name=\"test\" value=\"");
      if (_jspx_meth_fmt_message_13(_jspx_page_context)) return;
      out.write("\">\n            <input type=\"submit\" name=\"cancel\" value=\"");
      if (_jspx_meth_fmt_message_14(_jspx_page_context)) return;
      out.write(
          "\">\n        </td>\n    </tr>\n</tbody>\n</table>\n\n</form>\n\n    </body>\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      java.util.List resultList = null;
      synchronized (request) {
        resultList =
            (java.util.List)
                _jspx_page_context.getAttribute("resultList", PageContext.REQUEST_SCOPE);
        if (resultList == null) {
          throw new java.lang.InstantiationException("bean resultList not found within scope");
        }
      }
      out.write('\n');
      java.lang.String maxPages = null;
      synchronized (request) {
        maxPages =
            (java.lang.String)
                _jspx_page_context.getAttribute("maxPages", PageContext.REQUEST_SCOPE);
        if (maxPages == null) {
          throw new java.lang.InstantiationException("bean maxPages not found within scope");
        }
      }
      out.write('\n');
      java.lang.String currentPage = null;
      synchronized (request) {
        currentPage =
            (java.lang.String)
                _jspx_page_context.getAttribute("currentPage", PageContext.REQUEST_SCOPE);
        if (currentPage == null) {
          throw new java.lang.InstantiationException("bean currentPage not found within scope");
        }
      }
      out.write('\n');
      java.lang.String rowPerPage = null;
      synchronized (request) {
        rowPerPage =
            (java.lang.String)
                _jspx_page_context.getAttribute("rowPerPage", PageContext.REQUEST_SCOPE);
        if (rowPerPage == null) {
          throw new java.lang.InstantiationException("bean rowPerPage not found within scope");
        }
      }
      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("\n");
      out.write("<head>\n");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/hss.web.console/style/fokus_ngni.css\">\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n");
      out.write("<title>");
      if (_jspx_meth_bean_message_0(_jspx_page_context)) return;
      out.write("</title>\n");
      out.write("\n");
      out.write("<script type=\"text/javascript\" language=\"JavaScript\">\n");
      out.write("\n");
      out.write("function submitForm(pageId){\n");
      out.write("\tdocument.DSAI_SearchForm.crtPage.value = pageId;\n");
      out.write("\tdocument.DSAI_SearchForm.submit();\n");
      out.write("}\n");
      out.write("\n");
      out.write("function rowsPerPageChanged(){\n");
      out.write("\tdocument.DSAI_SearchForm.crtPage.value = 1;\r\n");
      out.write("\t//document.DSAI_SearchForm.rowsPerPageChanged=true;\n");
      out.write("\tdocument.DSAI_SearchForm.submit();\n");
      out.write("}\n");
      out.write("</script>\n");
      out.write("</head>\n");
      out.write("\n");
      out.write("<body>\n");
      out.write("\r\n");
      out.write("\t<table id=\"title-table\" align=\"center\" weight=\"100%\" >\r\n");
      out.write("\t<tr>\r\n");
      out.write("\t\t<td align=\"center\">\r\n");
      out.write("\t\t\t<h1> DSAI Search </h1>\r\n");
      out.write("\t\t\t<br/><br/>\r\n");
      out.write("\t\t</td>\r\n");
      out.write("\r\n");
      out.write("\t</table> <!-- title-table -->\r\n");
      out.write("\r\n");
      out.write("\t<table id=\"main-table\" align=\"center\" valign=\"middle\">\n");
      out.write("\t<tr>\n");
      out.write("\t\t<td>\n");
      out.write(
          "\t \t\t<table id=\"main-table\" class=\"as\" border=\"0\" cellspacing=\"1\" align=\"center\" style=\"border:2px solid #FF6600;\" width=\"400\">\n");
      out.write("\t\t\t\t<tr class=\"header\">\n");
      out.write("\t\t\t\t\t<td class=\"header\" width=\"50\"> ID </td>\n");
      out.write("\t\t\t\t\t<td class=\"header\"> DSAI-Tag </td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\n");
      out.write("\t\t\t\t");

      if (resultList != null && resultList.size() > 0) {
        DSAI dsai;
        int idx = 0;
        Iterator it = resultList.iterator();

        while (it.hasNext()) {
          dsai = (DSAI) it.next();

          out.write("\n");
          out.write("\t\t\t\t\t<tr class=\"");
          out.print(idx % 2 == 0 ? "even" : "odd");
          out.write("\">\n");
          out.write("\t\t\t\t\t\t<td>\n");
          out.write("\t\t\t\t\t\t\t");
          out.print(dsai.getId());
          out.write("\n");
          out.write("\t\t\t\t\t\t</td>\n");
          out.write("\t\t\t\t\t\t<td>\r\n");
          out.write("\t\t\t\t\t\t\t\t<a href=\"/hss.web.console/DSAI_Load.do?id=");
          out.print(dsai.getId());
          out.write("\">\n");
          out.write("\t\t\t\t\t\t\t\t");
          out.print(dsai.getDsai_tag());
          out.write("\n");
          out.write("\t\t\t\t\t\t\t</a>\n");
          out.write("\t\t\t\t\t\t</td>\n");
          out.write("\t\t\t\t\t</tr>\n");
          out.write("\t\t\t\t");

          idx++;
        } // while
      } // if
      else {

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

      out.write("\n");
      out.write("\t\t\t</table>\n");
      out.write("\t\t</td>\n");
      out.write("\t</tr>\n");
      out.write("\t<tr>\n");
      out.write("\t\t<td colspan=\"3\" class=\"header\">\n");
      out.write("\t\t\t");
      //  html:form
      org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 =
          (org.apache.struts.taglib.html.FormTag)
              _jspx_tagPool_html_form_action.get(org.apache.struts.taglib.html.FormTag.class);
      _jspx_th_html_form_0.setPageContext(_jspx_page_context);
      _jspx_th_html_form_0.setParent(null);
      _jspx_th_html_form_0.setAction("/DSAI_Search");
      int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
      if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\n");
          out.write("\t\t\t\t<table align=\"center\">\n");
          out.write("\t\t\t\t\t<tr>\n");
          out.write("\t\t\t\t\t\t<td>\n");
          out.write("\t\t\t\t\t\t");

          int length = Integer.parseInt(maxPages) + 1;
          int cPage = Integer.parseInt(currentPage) + 1;
          for (int iy = 1; iy < length; iy++) {
            if (cPage != iy) {

              out.write("\n");
              out.write("\t\t\t\t\t\t\t\t\t<a href=\"javascript:submitForm(");
              out.print(String.valueOf(iy));
              out.write(");\">");
              out.print(iy);
              out.write("</a>\n");
              out.write("\t\t\t\t\t\t");

            } else {

              out.write("\n");
              out.write("\t\t\t\t\t\t\t\t\t<font style=\"color:#FF0000;font-weight: 600;\">\n");
              out.write("\t\t\t\t\t\t\t\t\t\t");
              out.print(String.valueOf(iy));
              out.write("\n");
              out.write("\t\t\t\t\t\t\t\t\t</font>\n");
              out.write("\t\t\t\t\t\t\t\t");
            }
          }

          out.write("\n");
          out.write("\t\t\t\t\t\t</td>\n");
          out.write("\t\t\t\t\t\t<td>\n");
          out.write("\t\t\t\t\t\t\t");
          if (_jspx_meth_bean_message_2(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write("<br>\n");
          out.write("\t\t\t\t\t\t\t");
          if (_jspx_meth_html_hidden_0(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write("\n");
          out.write("\t\t\t\t\t\t\t");
          //  html:select
          org.apache.struts.taglib.html.SelectTag _jspx_th_html_select_0 =
              (org.apache.struts.taglib.html.SelectTag)
                  _jspx_tagPool_html_select_property_onchange.get(
                      org.apache.struts.taglib.html.SelectTag.class);
          _jspx_th_html_select_0.setPageContext(_jspx_page_context);
          _jspx_th_html_select_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
          _jspx_th_html_select_0.setProperty("rowsPerPage");
          _jspx_th_html_select_0.setOnchange("javascript:rowsPerPageChanged();");
          int _jspx_eval_html_select_0 = _jspx_th_html_select_0.doStartTag();
          if (_jspx_eval_html_select_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_html_select_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
              out = _jspx_page_context.pushBody();
              _jspx_th_html_select_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
              _jspx_th_html_select_0.doInitBody();
            }
            do {
              out.write("\n");
              out.write("\t\t\t\t\t\t\t\t<option value=\"20\"\n");
              out.write("\t\t\t\t\t\t\t\t\t");
              out.print(rowPerPage.equals("20") ? "selected" : "");
              out.write(" >20 </option>\n");
              out.write("\t\t\t\t\t\t\t\t<option value=\"30\"\n");
              out.write("\t\t\t\t\t\t\t\t\t");
              out.print(rowPerPage.equals("30") ? "selected" : "");
              out.write(" >30 </option>\n");
              out.write("\t\t\t\t\t\t\t\t<option value=\"50\"\n");
              out.write("\t\t\t\t\t\t\t\t\t");
              out.print(rowPerPage.equals("50") ? "selected" : "");
              out.write(" >50</option>\n");
              out.write("\t\t\t\t\t\t\t\t<option value=\"100\"\n");
              out.write("\t\t\t\t\t\t\t\t\t");
              out.print(rowPerPage.equals("100") ? "selected" : "");
              out.write(" >100</option>\n");
              out.write("\t\t\t\t\t\t\t");
              int evalDoAfterBody = _jspx_th_html_select_0.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
            } while (true);
            if (_jspx_eval_html_select_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
              out = _jspx_page_context.popBody();
          }
          if (_jspx_th_html_select_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
          _jspx_tagPool_html_select_property_onchange.reuse(_jspx_th_html_select_0);
          out.write("\n");
          out.write("\t\t\t\t\t\t</td>\n");
          out.write("\t\t\t\t\t</tr>\n");
          out.write("\t\t\t\t</table>\n");
          out.write("\t\t\t");
          int evalDoAfterBody = _jspx_th_html_form_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
      }
      if (_jspx_th_html_form_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      _jspx_tagPool_html_form_action.reuse(_jspx_th_html_form_0);
      out.write("\n");
      out.write("\t\t</td>\n");
      out.write("\t</tr>\n");
      out.write("\t</table>\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write("\n\n\n\n\n\n\n\n\n\n\n\n");
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      out.write('\n');
      // Get parameters
      boolean cancel = request.getParameter("cancel") != null;
      String username = ParamUtils.getParameter(request, "username");
      String jid = ParamUtils.getParameter(request, "jid");
      String nickname = ParamUtils.getParameter(request, "nickname");
      String groups = ParamUtils.getParameter(request, "groups");
      Integer sub = ParamUtils.getIntParameter(request, "sub", 0);
      boolean save = ParamUtils.getBooleanParameter(request, "save");

      // Handle a cancel
      if (cancel) {
        response.sendRedirect("user-roster.jsp?username="******"UTF-8"));
        return;
      }

      // Load the user's roster object
      Roster roster = webManager.getRosterManager().getRoster(username);

      // Load the roster item from the user's roster.
      RosterItem item = roster.getRosterItem(new JID(jid));

      // Handle a roster item delete:
      if (save) {
        List<String> groupList = new ArrayList<String>();
        if (groups != null) {
          for (String group : groups.split(",")) {
            groupList.add(group.trim());
          }
        }
        item.setNickname(nickname);
        item.setGroups(groupList);
        item.setSubStatus(RosterItem.SubType.getTypeFromInt(sub));
        // Delete the roster item
        roster.updateRosterItem(item);
        // Log the event
        webManager.logEvent("deleted roster item from " + username, "roster item:\njid = " + jid);
        // Done, so redirect
        response.sendRedirect(
            "user-roster.jsp?username="******"UTF-8")
                + "&editsuccess=true");
        return;
      }

      out.write("\n\n<html>\n    <head>\n        <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</title>\n        <meta name=\"subPageID\" content=\"user-roster\"/>\n        <meta name=\"extraParams\" content=\"");
      out.print("username="******"UTF-8"));
      out.write("\"/>\n    </head>\n    <body>\n\n<p>\n");
      //  fmt:message
      org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_1 =
          (org.apache.taglibs.standard.tag.rt.fmt.MessageTag)
              _jspx_tagPool_fmt_message_key.get(
                  org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
      _jspx_th_fmt_message_1.setPageContext(_jspx_page_context);
      _jspx_th_fmt_message_1.setParent(null);
      _jspx_th_fmt_message_1.setKey("user.roster.edit.info");
      int _jspx_eval_fmt_message_1 = _jspx_th_fmt_message_1.doStartTag();
      if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.pushBody();
          _jspx_th_fmt_message_1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
          _jspx_th_fmt_message_1.doInitBody();
        }
        do {
          out.write("\n    ");
          //  fmt:param
          org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_0 =
              (org.apache.taglibs.standard.tag.rt.fmt.ParamTag)
                  _jspx_tagPool_fmt_param_value_nobody.get(
                      org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
          _jspx_th_fmt_param_0.setPageContext(_jspx_page_context);
          _jspx_th_fmt_param_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_1);
          _jspx_th_fmt_param_0.setValue(StringUtils.escapeForXML(username));
          int _jspx_eval_fmt_param_0 = _jspx_th_fmt_param_0.doStartTag();
          if (_jspx_th_fmt_param_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
            return;
          }
          _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
          out.write('\n');
          int evalDoAfterBody = _jspx_th_fmt_message_1.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
        if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = _jspx_page_context.popBody();
      }
      if (_jspx_th_fmt_message_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_1);
        return;
      }
      _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_1);
      out.write("\n</p>\n\n<fieldset>\n    <legend>");
      if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
      out.write(
          "</legend>\n    <div>\n    <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n    <tbody>\n        <tr>\n            <td class=\"c1\">\n                ");
      if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
      out.write(":\n            </td>\n            <td>\n                ");
      out.print(StringUtils.escapeHTMLTags(jid));
      out.write(
          "\n            </td>\n        </tr>\n        <tr>\n            <td class=\"c1\">\n                ");
      if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
      out.write(":\n            </td>\n            <td>\n                ");
      out.print(StringUtils.escapeHTMLTags(item.getNickname()));
      out.write(
          "\n            </td>\n        </tr>\n        <tr>\n            <td class=\"c1\">\n                ");
      if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
      out.write(":\n            </td>\n            <td>\n                ");

      List<String> groupList = item.getGroups();
      if (!groupList.isEmpty()) {
        int count = 0;
        for (String group : groupList) {
          if (count != 0) {
            out.print(",");
          }
          out.print(StringUtils.escapeForXML(group));
          count++;
        }
      } else {
        out.print("<i>None</i>");
      }

      out.write(
          "\n            </td>\n        </tr>\n        <tr>\n            <td class=\"c1\">\n                <a href=\"group-summary.jsp\">");
      if (_jspx_meth_fmt_message_6(_jspx_page_context)) return;
      out.write("</a>:\n            </td>\n            <td>\n                ");

      Collection<Group> sharedGroups = item.getSharedGroups();
      if (!sharedGroups.isEmpty()) {
        int count = 0;
        for (Group group : sharedGroups) {
          if (count != 0) {
            out.print(",");
          }
          out.print(
              "<a href='group-edit.jsp?group="
                  + URLEncoder.encode(group.getName(), "UTF-8")
                  + "'>");
          out.print(StringUtils.escapeForXML(group.getName()));
          out.print("</a>");
          count++;
        }
      } else {
        out.print("<i>None</i>");
      }

      out.write(
          "\n            </td>\n        </tr>\n        <tr>\n            <td class=\"c1\">\n                ");
      if (_jspx_meth_fmt_message_7(_jspx_page_context)) return;
      out.write(":\n            </td>\n            <td>\n                ");
      out.print(StringUtils.escapeHTMLTags(item.getSubStatus().getName()));
      out.write(
          "\n            </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n</fieldset>\n\n<br><br>\n\n<form style=\"display: inline\" action=\"user-roster-edit.jsp\">\n<input type=\"hidden\" name=\"jid\" value=\"");
      out.print(StringUtils.escapeForXML(jid));
      out.write("\">\n<input type=\"hidden\" name=\"username\" value=\"");
      out.print(StringUtils.escapeForXML(username));
      out.write("\">\n<input type=\"submit\" value=\"");
      if (_jspx_meth_fmt_message_8(_jspx_page_context)) return;
      out.write("\">\n</form>\n\n");
      if (sharedGroups.isEmpty()) {
        out.write(
            "\n<form style=\"display: inline\" action=\"user-roster-delete.jsp\">\n<input type=\"hidden\" name=\"jid\" value=\"");
        out.print(StringUtils.escapeForXML(jid));
        out.write("\">\n<input type=\"hidden\" name=\"username\" value=\"");
        out.print(StringUtils.escapeForXML(username));
        out.write("\">\n<input type=\"submit\" value=\"");
        if (_jspx_meth_fmt_message_9(_jspx_page_context)) return;
        out.write("\">\n</form>\n");
      }
      out.write("\n\n    </body>\n</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

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

      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<!-- DW6 -->\r\n<head>\r\n<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>DEPTHS</title>\r\n<link rel=\"stylesheet\" href=\"../css/unitTemplate.css\" type=\"text/css\"/>\r\n</style><style type=\"text/css\">\r\n  <!--\r\n    .copyrightStyle {\r\n    font-size: 12px;\r\n    color: #006699;\r\n    }\r\n  -->\r\n</style>\r\n<script language=\"javascript\" src=\"js/matching_columns.js\" type=\"text/javascript\"></script>\r\n</head>\r\n<!-- JSP code -->\r\n");
      depths.presentationModule.RegistrationBean registrationBeanId = null;
      synchronized (session) {
        registrationBeanId =
            (depths.presentationModule.RegistrationBean)
                _jspx_page_context.getAttribute("registrationBeanId", PageContext.SESSION_SCOPE);
        if (registrationBeanId == null) {
          registrationBeanId = new depths.presentationModule.RegistrationBean();
          _jspx_page_context.setAttribute(
              "registrationBeanId", registrationBeanId, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      depths.presentationModule.TestBean testBeanId = null;
      synchronized (session) {
        testBeanId =
            (depths.presentationModule.TestBean)
                _jspx_page_context.getAttribute("testBeanId", PageContext.SESSION_SCOPE);
        if (testBeanId == null) {
          testBeanId = new depths.presentationModule.TestBean();
          _jspx_page_context.setAttribute("testBeanId", testBeanId, PageContext.SESSION_SCOPE);
        }
      }
      out.write(
          "\r\n\r\n<body>\r\n\r\n<div id=\"page\">\r\n<DIV id=masthead>\r\n<DIV id=globalNav><a href=\"#\">Performance</a> |\r\n<a href=\"#\">Statistic</a> |\r\n<a href=\"#\">Tools</a> |\r\n<a href=\"#\">Help</a>\r\n</DIV><!--globalNav-->\r\n</DIV><!--mastHead-->\r\n  <div id=\"navBar\" class=\"column\">\r\n  <div id=\"blank\">\r\n    <p>&nbsp;</p>\r\n    <p>&nbsp;</p>\r\n    <p>&nbsp;</p>\r\n  </div> <!--blank-->\r\n  <div id=\"search\">\r\n    <label>Curriculum</label>\r\n  </div><!--search-->\r\n  <div id=\"sectionLinks\">\r\n\r\n    <a href=\"bla bla\">bla bla\r\n\r\n    </a>\r\n\r\n\t<br />\r\n\r\n\r\n  </div><!--sectionLinks-->\r\n  <div id=\"search\">\r\n    <br/>\r\n    <br/>\r\n    <label>Passed concepts</label>\r\n  </div> <!--search-->\r\n  <div id=\"sectionLinks\">\r\n\r\n\r\n\r\n\r\n  <a href=\"bla bla\" >bla bla\r\n    </a><br />\r\n\r\n\r\n  </div><!--sectionLinks-->\r\n  <div id=\"advert\">\r\n    <p>&nbsp;</p>\r\n  </div><!--adverts-->\r\n  <div id=\"headlines\">\r\n  </div><!--headlines-->\r\n</div><!--navBar-->\r\n<div id=\"content\" class=\"column\">\r\n\r\n  <div id=\"previousNextLinks\">\r\n    <div id=\"breadCrumb\">\r\n\r\n\r\n    </div><!--breadCrumb-->\r\n");
      out.write(
          "    <div id=\"breadCrumb2\">\r\n\r\n      <a href=\"getNext.jsp?nextButton=next\">        Next\r\n        &gt;&gt;\r\n</a>\r\n    </div>\r\n  </div><!--previousNextLinks-->\r\n  <br/>\r\n  <br/>\r\n  <h1 id=\"pageName\">Welcome to the DEPTHS learning system </h1>\r\n  <div class=\"story\">\r\n\r\n ");
      registrationBeanId.setFormRepeated(true);
      out.write("\r\n\t  ");
      out.write("\r\n\t  ");
      firstNameAdded = registrationBeanId.getAddedData("firstName");
      out.write("\r\n\t  ");
      lastNameAdded = registrationBeanId.getAddedData("lastName");
      out.write("\r\n\t  ");
      userNameAdded = registrationBeanId.getAddedData("userName");
      out.write("\r\n\t  ");
      emailAdded = registrationBeanId.getAddedData("email");
      out.write("\r\n\t  ");
      passwordAdded = registrationBeanId.getAddedData("password");
      out.write("\r\n\t  ");
      passwordConfirmationAdded = registrationBeanId.getAddedData("passwordConfirmation");
      out.write("\r\n\t  ");
      passwordsSame = registrationBeanId.getPasswordSame();
      out.write(
          "\r\n\r\n\r\n      <TABLE width=500 align=left>\r\n              <FORM name=userRegisterForm method=\"POST\" action=\"settingUserData.jsp\">\r\n              <TBODY>\r\n              <TR>\r\n                <TD class=PageTitle colSpan=2>\r\n                <H2 ><font color=\"#FF0000\">Registration error!</font> </H2></TD>\r\n              </TR>\r\n              <TR>\r\n                <TD>&nbsp;</TD></TR>\r\n              <TR>\r\n                <TD class=text align=left colSpan=2>All fields marked with an\r\n                  <FONT color=red><B><BIG>*</BIG></B></FONT> are required.\r\n</TD></TR>\r\n              <TR>\r\n                <TD colSpan=2>\r\n                  <TABLE cellSpacing=1 cellPadding=2 width=\"95%\" border=0>\r\n                    <TBODY>\r\n\t\t\t\t\t");
      if (firstNameAdded == false) {
        out.write(
            "\r\n                    <TR bgColor=#f0f0f0>\r\n                      <TD class=text noWrap align=left>&nbsp;<FONT\r\n                        color=red>*</FONT>First name</TD>\r\n                      <TD class=text noWrap align=left><INPUT size=50\r\n                        name=firstName></TD></TR>\r\n\t\t\t\t\t\t");
      }
      out.write("\r\n\t\t\t\t\t\t");
      if (lastNameAdded == false) {
        out.write(
            "\r\n                    <TR bgColor=#f0f0f0>\r\n                      <TD class=text noWrap align=left>&nbsp;<FONT\r\n                        color=red>*</FONT>Last name</TD>\r\n                      <TD class=text noWrap align=left><INPUT size=50\r\n                        name=lastName></TD></TR>\r\n\t\t");
      }
      out.write("\r\n\t\t");
      if (userNameAdded == false) {
        out.write(
            "\r\n                    <TR bgColor=#f0f0f0>\r\n                      <TD class=text noWrap align=left><FONT\r\n                        color=red> &nbsp;*</FONT>Username</TD>\r\n                      <TD class=text noWrap align=left><INPUT size=50\r\n                        name=userName></TD>\r\n                    </TR>\r\n\t\t");
      }
      out.write("\r\n\t\t");
      if (emailAdded == false) {
        out.write(
            "\r\n                    <TR bgColor=#f0f0f0>\r\n                      <TD class=text noWrap align=left><FONT\r\n                        color=red>*</FONT>&nbsp;Email address</TD>\r\n                      <TD class=text noWrap align=left> <INPUT size=50 name=email>\r\n                    </TD></TR>\r\n\t\t");
      }
      out.write("\r\n\t\t");
      if (passwordsSame == false) {
        out.write(
            "\r\n                    <TR bgColor=#f0f0f0>\r\n                      <TD class=text noWrap align=left>&nbsp;<FONT\r\n                        color=red>*</FONT>Your Password:</TD>\r\n                      <TD class=text noWrap align=left><INPUT type=password\r\n                        size=30 name=password></TD></TR>\r\n                    <TR bgColor=#f0f0f0>\r\n                      <TD class=text noWrap align=left>&nbsp;<FONT\r\n                        color=red>*</FONT>Repeat password</TD>\r\n                      <TD class=text noWrap align=left><INPUT type=password\r\n                        size=30 name=passwordConfirmation></TD></TR></TBODY></TABLE></TD>\r\n              <TR>\r\n\t\t\t  ");
      }
      out.write(
          "\r\n                <TD align=center colSpan=2><INPUT type=submit value=Submit>\r\n              </TD></TR></FORM></TBODY></TABLE>\r\n\r\n\r\n\r\n\r\n\r\n      <p>&nbsp;</p>\r\n\r\n  </div><!--story-->\r\n</div><!--content-->\r\n<!--end content -->\r\n\r\n<!--end navbar -->\r\n<div id=\"siteInfo\" align=\"center\">\r\n  <a href=\"#\">About Us</a>\r\n  |\r\n  <a href=\"#\">Site Map</a>\r\n  |\r\n  <a href=\"#\">Privacy Policy</a>\r\n  |\r\n  <a href=\"mailto:[email protected]\">Contact Us</a>\r\n  <br/>\r\n  <span class=\"copyrightStyle\">    &copy;\r\n    2006 FON - School of Business Administration, University of Belgrade\r\n</span>\r\n</div><!-siteInfo-->\r\n<br/>\r\n</div>\r\n</body>\r\n\r\n</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  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);
    }
  }
 public Object getPageAttribute(String name) {
   return pageContext.getAttribute(name);
 }
  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");
      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");
      if (_jspx_meth_html_html_0(pageContext)) return;
    } 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);
    }
  }