# Class FilterUtil

java.lang.Object
org.apache.catalina.util.FilterUtil

public class FilterUtil extends Object
General purpose utility methods related to filters and filter processing.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getRequestPath(ServletRequest request)`
  Returns the request path from the dispatcher request path attribute.
  `static boolean`
  `matchFiltersURL(FilterMap filterMap, String requestPath)`
  Tests if the provided, context-relative, request path matches the provided filter mapping.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### matchFiltersURL

    public static boolean matchFiltersURL(FilterMap filterMap, String requestPath)
    Tests if the provided, context-relative, request path matches the provided filter mapping.
    Parameters:
      `filterMap` - Filter mapping being checked
      `requestPath` - Context-relative request path of this request
    Returns:
      `true` if the context-relative request path matches the requirements of the specified filter mapping; otherwise, return `false`.

  - ### getRequestPath

    public static String getRequestPath(ServletRequest request)
    Returns the request path from the dispatcher request path attribute.
    Parameters:
      `request` - The servlet request
    Returns:
      The request path, or `null` if not available