code: protected void addDefaultApps(ContextHandlerCollection parent,
        final String appDir) throws IOException {
      // set up the context for "/logs/" if "hadoop.log.dir" property is defined. 
      String logDir = System.getProperty("hadoop.log.dir");
      if (logDir != null) {
        Context logContext = new Context(parent, "/logs");
        logContext.setResourceBase(logDir);
        logContext.addServlet(StaticServlet.class, "/");
        defaultContexts.put(logContext, true);
      }
      // set up the context for "/static/*"
      Context staticContext = new Context(parent, "/static");
      staticContext.setResourceBase(appDir + "/static");
      staticContext.addServlet(StaticServlet.class, "/*");
      defaultContexts.put(staticContext, true);
    }
docs: Add default apps.
  @param appDir The application directory
  @throws IOException