FilterRegistration (Apache Tomcat 7.0.104 API Documentation)

javax.servlet

## Interface FilterRegistration

- All Superinterfaces:
    Registration
  All Known Subinterfaces:
    FilterRegistration.Dynamic
  All Known Implementing Classes:
    ApplicationFilterRegistration

      public interface FilterRegistration
      extends Registration

  Since:
    Servlet 3.0 TODO SERVLET3 - Add comments

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `FilterRegistration.Dynamic`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... servletNames)` Add a mapping for this filter to one or more named Servlets.
    `void` | `addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... urlPatterns)` Add a mapping for this filter to one or more URL patterns.
    `Collection<String>` | `getServletNameMappings()`
    `Collection<String>` | `getUrlPatternMappings()`

    - ### Methods inherited from interface javax.servlet.Registration

      `getClassName, getInitParameter, getInitParameters, getName, setInitParameter, setInitParameters`

- - ### Method Detail

    - #### addMappingForServletNames

          void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes,
                                       boolean isMatchAfter,
                                       String... servletNames)

      Add a mapping for this filter to one or more named Servlets.
      Parameters:
        `dispatcherTypes` - The dispatch types to which this filter should apply
        `isMatchAfter` - Should this filter be applied after any mappings defined in the deployment descriptor (`true`) or before?
        `servletNames` - Requests mapped to these servlets will be processed by this filter
      Throws:
        `IllegalArgumentException` - if the list of servlet names is empty or null
        `IllegalStateException` - if the associated ServletContext has already been initialised

    - #### getServletNameMappings

          Collection<String> getServletNameMappings()

      Returns:
        TODO

    - #### addMappingForUrlPatterns

          void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes,
                                      boolean isMatchAfter,
                                      String... urlPatterns)

      Add a mapping for this filter to one or more URL patterns.
      Parameters:
        `dispatcherTypes` - The dispatch types to which this filter should apply
        `isMatchAfter` - Should this filter be applied after any mappings defined in the deployment descriptor (`true`) or before?
        `urlPatterns` - The URL patterns to which this filter should be applied
      Throws:
        `IllegalArgumentException` - if the list of URL patterns is empty or null
        `IllegalStateException` - if the associated ServletContext has already been initialised

    - #### getUrlPatternMappings

          Collection<String> getUrlPatternMappings()

      Returns:
        TODO

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.