java.lang.Object
com.aoapps.net.URIResolver
Utilities for resolving URI.
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAbsolutePath
(String servletPath, String relativeUrlPath) Resolves a possibly relative path to a context-absolute path.
-
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
-