code: public URL resolveURL(FacesContext context, URL source, String path) throws IOException
      {
          if (path.startsWith("/"))
          {
              context.getAttributes().put(LAST_RESOURCE_RESOLVED, null);
              URL url = resolveURL(context, path);
              if (url == null)
              {
                  throw new FileNotFoundException(path + " Not Found in ExternalContext as a Resource");
              }
              return url;
          }
          else
          {
              return new URL(source, path);
          }
      }
docs: Resolves a path based on the passed URL. If the path starts with '/', then resolve the path against
  {@link javax.faces.context.ExternalContext#getResource(java.lang.String)
  javax.faces.context.ExternalContext#getResource(java.lang.String)}. Otherwise create a new URL via
  {@link URL#URL(java.net.URL, java.lang.String) URL(URL, String)}.
  
  @param source
  base to resolve from
  @param path
  relative path to the source
  @return resolved URL
  @throws IOException