Class RedirectPatternRule

    • Constructor Detail

      • RedirectPatternRule

        public RedirectPatternRule()
      • RedirectPatternRule

        public RedirectPatternRule​(@Name("pattern")
                                   String pattern,
                                   @Name("location")
                                   String location)
    • Method Detail

      • setLocation

        public void setLocation​(String value)
        Sets the redirect location.
        Parameters:
        value - the location to redirect.
      • setStatusCode

        public void setStatusCode​(int statusCode)
        Sets the redirect status code.
        Parameters:
        statusCode - the 3xx redirect status code
      • apply

        public String apply​(String target,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws IOException
        Description copied from class: PatternRule
        Apply the rule to the request
        Specified by:
        apply in class PatternRule
        Parameters:
        target - field to attempt match
        request - request object
        response - response object
        Returns:
        The target (possible updated)
        Throws:
        IOException - exceptions dealing with operating on request or response objects
      • toString

        public String toString()
        Returns the redirect status code and location.
        Overrides:
        toString in class PatternRule