Class HttpHandlerRegistration

    • Method Detail

      • fromString

        public static HttpHandlerRegistration fromString​(String mapping)
        Create a registration from the mapping String. The part of the mapping before the second slash '/' occurrence will be treated as context-path and the remainder will be treated as a url-pattern. For example: 1) "" will be treated as context-path("") and url-pattern(""); 2) "/" will be treated as context-path("") and url-pattern("/"); 3) "/a/b/c" will be treated as context-path("/a") and url-pattern("/b/c"); 4) "/*" will be treated as context-path("") and url-pattern("/*") 5) "*.jpg" will be treated as context-path("") and url-pattern("*.jpg")
        Parameters:
        mapping - the String
        Returns:
        HttpHandlerRegistration
      • getContextPath

        public String getContextPath()
        Returns:
        context-path part of the registration
      • getUrlPattern

        public String getUrlPattern()
        Returns:
        url-pattern part of the registration
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object