private void initializeWebServer(String name, String hostName, Configuration conf,
    String[] pathSpecs, HttpServer.Builder b) throws FileNotFoundException, IOException {

    Preconditions.checkNotNull(webAppContext);

    HandlerCollection handlerCollection = new HandlerCollection();

    ContextHandlerCollection contexts = new ContextHandlerCollection();
    RequestLog requestLog = HttpRequestLog.getRequestLog(name);

    if (requestLog != null) {
      RequestLogHandler requestLogHandler = new RequestLogHandler();
      requestLogHandler.setRequestLog(requestLog);
      handlerCollection.addHandler(requestLogHandler);
    }

    final String appDir = getWebAppsPath(name);

    handlerCollection.addHandler(contexts);
    handlerCollection.addHandler(webAppContext);

    webServer.setHandler(handlerCollection);

    webAppContext.setAttribute(ADMINS_ACL, adminsAcl);

    // Default apps need to be set first, so that all filters are applied to them.
    // Because they're added to defaultContexts, we need them there before we start
    // adding filters
    addDefaultApps(contexts, appDir, conf);

    addGlobalFilter("safety", QuotingInputFilter.class.getName(), null);

    addGlobalFilter("clickjackingprevention", ClickjackingPreventionFilter.class.getName(),
      ClickjackingPreventionFilter.getDefaultParameters(conf));

    HttpConfig httpConfig = new HttpConfig(conf);

    addGlobalFilter("securityheaders", SecurityHeadersFilter.class.getName(),
      SecurityHeadersFilter.getDefaultParameters(conf, httpConfig.isSecure()));

    // But security needs to be enabled prior to adding the other servlets
    if (authenticationEnabled) {
      initSpnego(conf, hostName, b.usernameConfKey, b.keytabConfKey, b.kerberosNameRulesKey,
        b.signatureSecretFileKey);
    }

    final FilterInitializer[] initializers = getFilterInitializers(conf);
    if (initializers != null) {
      conf = new Configuration(conf);
      conf.set(BIND_ADDRESS, hostName);
      for (FilterInitializer c : initializers) {
        c.initFilter(this, conf);
      }
    }

    addDefaultServlets(contexts, conf);

    if (pathSpecs != null) {
      for (String path : pathSpecs) {
        LOG.info("adding path spec: " + path);
        addFilterPathMapping(path, webAppContext);
      }
    }
    // Check if disable stack trace property is configured
    if (!conf.getBoolean(HTTP_UI_SHOW_STACKTRACE_KEY, true)) {
      // Disable stack traces for server errors in UI
      webServer.setErrorHandler(new ErrorHandler());
      webServer.getErrorHandler().setShowStacks(false);
      // Disable stack traces for web app errors in UI
      webAppContext.getErrorHandler().setShowStacks(false);
    }
  }
Create a status server on the given port. The jsp scripts are taken from
src/webapps/&lt;name&gt;.
@param name        The name of the server
@param bindAddress The address for this server
@param port        The port to use on the server
@param findPort    whether the server should start at the given port and increment by 1 until
                   it finds a free port.
@param conf        Configuration
@param adminsAcl   {@link AccessControlList} of the admins
@param pathSpecs   Path specifications that this httpserver will be serving. These will be
                   added to any filters.
@deprecated Since 0.99.0
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java