public void addJerseyResourcePackage(final String packageName, final String pathSpec) {
    LOG.info("addJerseyResourcePackage: packageName=" + packageName + ", pathSpec=" + pathSpec);

    ResourceConfig application = new ResourceConfig().packages(packageName);
    final ServletHolder sh = new ServletHolder(new ServletContainer(application));
    webAppContext.addServlet(sh, pathSpec);
  }
Add a Jersey resource package.
@param packageName The Java package name containing the Jersey resource.
@param pathSpec    The path spec for the servlet
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java