protected String getWebAppsPath(String webapps, String appName) throws FileNotFoundException {
    URL url = getClass().getClassLoader().getResource(webapps + "/" + appName);

    if (url == null) {
      throw new FileNotFoundException(webapps + "/" + appName + " not found in CLASSPATH");
    }

    String urlString = url.toString();
    return urlString.substring(0, urlString.lastIndexOf('/'));
  }
Get the pathname to the webapps files.
@param appName eg "secondary" or "datanode"
@return the pathname as a URL
@throws FileNotFoundException if 'webapps' directory cannot be found on CLASSPATH.
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java