/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
private void installAuthFilter(HttpContext httpContext) { final Filter f = new OSGiAuthFilter(httpContext); try { f.init(new OSGiFilterConfig(this)); } catch (Exception ignored) { // won't happen } FilterRegistration registration = addFilter(Integer.toString(f.hashCode()), f); registration.addMappingForUrlPatterns(null, "/*"); } }
private void installAuthFilter(HttpContext httpContext) { final Filter f = new OSGiAuthFilter(httpContext); try { f.init(new OSGiFilterConfig(this)); } catch (Exception ignored) { // won't happen } FilterRegistration registration = addFilter(Integer.toString(f.hashCode()), f); registration.addMappingForUrlPatterns(null, "/*"); } }
registration.addMappingForUrlPatterns(null, urlPattern);
registration.addMappingForUrlPatterns(null, urlPattern);
filterRegistration.addMappingForUrlPatterns( grizzlyDispatcherTypes(filterDescriptor.getDispatcherTypes()), servletPathLocal);