code: protected void addContext(String pathSpec, String dir, boolean isFiltered) throws IOException {
      if (0 == webServer.getHandlers().length) {
        throw new RuntimeException("Couldn't find handler");
      }
      WebAppContext webAppCtx = new WebAppContext();
      webAppCtx.setContextPath(pathSpec);
      webAppCtx.setWar(dir);
      addContext(webAppCtx, true);
    }
docs: Add a context
  @param pathSpec The path spec for the context
  @param dir The directory containing the context
  @param isFiltered if true, the servlet is added to the filter path mapping
  @throws IOException