Java Code Examples for javax.servlet.FilterRegistration#setInitParameters()

The following examples show how to use javax.servlet.FilterRegistration#setInitParameters() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CamundaBpmRestInitializer.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 6 votes vote down vote up
private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filterClass, final Map<String, String> initParameters,
                                          final String... urlPatterns) {
  FilterRegistration filterRegistration = servletContext.getFilterRegistration(filterName);

  if (filterRegistration == null) {
    filterRegistration = servletContext.addFilter(filterName, filterClass);
    filterRegistration.addMappingForUrlPatterns(DISPATCHER_TYPES, true, urlPatterns);

    if (initParameters != null) {
      filterRegistration.setInitParameters(initParameters);
    }

    log.debug("Filter {} for URL {} registered.", filterName, urlPatterns);
  }

  return filterRegistration;
}
 
Example 2
Source File: CamundaBpmWebappInitializer.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 6 votes vote down vote up
private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filterClass, final Map<String, String> initParameters,
                                          final String... urlPatterns) {
  FilterRegistration filterRegistration = servletContext.getFilterRegistration(filterName);

  if (filterRegistration == null) {
    filterRegistration = servletContext.addFilter(filterName, filterClass);
    filterRegistration.addMappingForUrlPatterns(DISPATCHER_TYPES, true, urlPatterns);

    if (initParameters != null) {
      filterRegistration.setInitParameters(initParameters);
    }

    log.debug("Filter {} for URL {} registered.", filterName, urlPatterns);
  }

  return filterRegistration;
}
 
Example 3
Source File: CamundaBpmRestInitializer.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filterClass, final Map<String, String> initParameters,
                                          final String... urlPatterns) {
  FilterRegistration filterRegistration = servletContext.getFilterRegistration(filterName);

  if (filterRegistration == null) {
    filterRegistration = servletContext.addFilter(filterName, filterClass);
    filterRegistration.addMappingForUrlPatterns(DISPATCHER_TYPES, true, urlPatterns);

    if (initParameters != null) {
      filterRegistration.setInitParameters(initParameters);
    }

    log.debug("Filter {} for URL {} registered.", filterName, urlPatterns);
  }

  return filterRegistration;
}
 
Example 4
Source File: CamundaBpmWebappInitializer.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filterClass, final Map<String, String> initParameters,
                                          final String... urlPatterns) {
  FilterRegistration filterRegistration = servletContext.getFilterRegistration(filterName);

  if (filterRegistration == null) {
    filterRegistration = servletContext.addFilter(filterName, filterClass);
    filterRegistration.addMappingForUrlPatterns(DISPATCHER_TYPES, true, urlPatterns);

    if (initParameters != null) {
      filterRegistration.setInitParameters(initParameters);
    }

    log.debug("Filter {} for URL {} registered.", filterName, urlPatterns);
  }

  return filterRegistration;
}