Class URIResolver

java.lang.Object
com.aoapps.net.URIResolver

public final class URIResolver extends Object
Utilities for resolving URI.
Author:
AO Industries, Inc.
  • Method Details

    • getAbsolutePath

      public static String getAbsolutePath(String servletPath, String relativeUrlPath) throws MalformedURLException
      Resolves a possibly relative path to a context-absolute path. Resolves ./ and ../ at the beginning of the URL but not in the middle of the URL. (TODO: Resolve in middle, too) If the URL begins with http:, https:, javascript:, mailto:, telnet:, tel:, cid:, file:, or data:, (case-insensitive) it is not altered.
      Parameters:
      servletPath - Required when path might be altered.
      Throws:
      MalformedURLException