Class URLTool


  • public class URLTool
    extends Object
    Velocity tool to parse URL parts.
    Since:
    6.3M1
    Version:
    $Id: 710b083ae0a3b685c404ed8adb47803f59671231 $
    • Constructor Detail

      • URLTool

        public URLTool()
    • Method Detail

      • parseQuery

        public Map<String,​List<String>> parseQuery​(String query)
        Parse a query string into a map of key-value pairs.
        Parameters:
        query - query string to be parsed
        Returns:
        a mapping of parameter names to values suitable e.g. to pass into EscapeTool.url(Map)
      • toURL

        public URL toURL​(String urlString)
        Convert a string to an URL object, if it's possible.
        Parameters:
        urlString - string to be convert
        Returns:
        an URL object from a given string
        Since:
        12.9RC1