Class HttpHandlerRegistration

    • Method Detail

      • fromString

        public static HttpHandlerRegistration fromString​(java.lang.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 java.lang.String getContextPath()
        Returns:
        context-path part of the registration
      • getUrlPattern

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object