Examples of addMappingForUrlPatterns()


Examples of javax.servlet.FilterRegistration.addMappingForUrlPatterns()

              // Adding resources with new extensions still requires a restart.

          // Development mode only works when the dispatch mode is not DO_FILTER, since DO_FILTER mode depends
          // on the Faces Servlet being "exact"-mapped on the view resources.

          facesViewsRegistration.addMappingForUrlPatterns(null, isFilterAfterDeclaredFilters(servletContext), "/*");
        } else {

          // In non-development mode, only map this Filter to specific resources

          // Map the forwarding filter to all the resources we found.
View Full Code Here

Examples of javax.servlet.FilterRegistration.addMappingForUrlPatterns()

          // In non-development mode, only map this Filter to specific resources

          // Map the forwarding filter to all the resources we found.
          for (String resource : collectedViews.keySet()) {
            facesViewsRegistration.addMappingForUrlPatterns(null, isFilterAfterDeclaredFilters(servletContext), resource);
          }

          // Additionally map the filter to all paths that were scanned and which are also directly
          // accessible. This is to give the filter an opportunity to block these.
          for (String path : getPublicRootPaths(servletContext)) {
View Full Code Here

Examples of javax.servlet.FilterRegistration.addMappingForUrlPatterns()

          }

          // Additionally map the filter to all paths that were scanned and which are also directly
          // accessible. This is to give the filter an opportunity to block these.
          for (String path : getPublicRootPaths(servletContext)) {
            facesViewsRegistration.addMappingForUrlPatterns(null, false, path + "*");
          }
        }

        // We now need to map the Faces Servlet to the extensions we found, but at this point in time
        // this Faces Servlet might not be created yet, so we do this part in FacesViewInitializedListener.
View Full Code Here

Examples of javax.servlet.FilterRegistration.addMappingForUrlPatterns()

        else
        {
            registration=sce.getServletContext().getFilterRegistration("TestFilter");
        }
        registration.setInitParameter("remote", "false");
        registration.addMappingForUrlPatterns(
                EnumSet.of(DispatcherType.ERROR,DispatcherType.ASYNC,DispatcherType.FORWARD,DispatcherType.INCLUDE,DispatcherType.REQUEST),
                true,
                new String[]{"/*"});
    }

View Full Code Here

Examples of javax.servlet.FilterRegistration.addMappingForUrlPatterns()

        dynamic.addMapping("/");

        //4、CharacterEncodingFilter
        FilterRegistration filterRegistration =
                sc.addFilter("characterEncodingFilter", CharacterEncodingFilter.class);
        filterRegistration.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/*");


    }
}
View Full Code Here

Examples of javax.servlet.FilterRegistration.addMappingForUrlPatterns()

                    final FilterRegistration filterRegistration =
                            context.addFilter(filterDescriptor.getFilterName(), filterDescriptor.getFilterClass());

                    filterRegistration.setInitParameters(filterDescriptor.getInitParams());
                    filterRegistration.addMappingForUrlPatterns(
                            grizzlyDispatcherTypes(filterDescriptor.getDispatcherTypes()),
                            true,
                            servletPathLocal);
                }
            }
View Full Code Here

Examples of javax.servlet.FilterRegistration.Dynamic.addMappingForUrlPatterns()

        servletContext.addServlet("dispatcher", new DispatcherServlet(rootContext));
    dispatcher.setLoadOnStartup(1);
    dispatcher.addMapping("/");
   
    Dynamic filter = servletContext.addFilter("characterEncodingFilter", CharacterEncodingFilter.class);
    filter.addMappingForUrlPatterns(null, false, "/*");
    filter.setInitParameter("encoding", "UTF-8");
    filter.setInitParameter("forceEncoding", "true");
   
    servletContext.addFilter("corsFilter", CorsFilter.class)
      .addMappingForUrlPatterns(null, false, "/*");
 
View Full Code Here

Examples of javax.servlet.FilterRegistration.Dynamic.addMappingForUrlPatterns()

        if(registration == null) {
            throw new IllegalStateException("Duplicate Filter registration for '" + filterName +"'. Check to ensure the Filter is only configured once.");
        }
        registration.setAsyncSupported(isAsyncSecuritySupported());
        EnumSet<DispatcherType> dispatcherTypes = getSecurityDispatcherTypes();
        registration.addMappingForUrlPatterns(dispatcherTypes, !insertBeforeOtherFilters, "/*");
    }

    /**
     * Returns the {@link DelegatingFilterProxy#getContextAttribute()} or null
     * if the parent {@link ApplicationContext} should be used. The default
View Full Code Here

Examples of javax.servlet.FilterRegistration.Dynamic.addMappingForUrlPatterns()

        if(registration == null) {
            throw new IllegalStateException("Duplicate Filter registration for '" + filterName +"'. Check to ensure the Filter is only configured once.");
        }
        registration.setAsyncSupported(isAsyncSessionSupported());
        EnumSet<DispatcherType> dispatcherTypes = getSessionDispatcherTypes();
        registration.addMappingForUrlPatterns(dispatcherTypes, !insertBeforeOtherFilters, "/*");
    }

    /**
     * Returns the {@link DelegatingFilterProxy#getContextAttribute()} or null
     * if the parent {@link ApplicationContext} should be used. The default
View Full Code Here

Examples of javax.servlet.FilterRegistration.Dynamic.addMappingForUrlPatterns()

        if(registration == null) {
            throw new IllegalStateException("Duplicate Filter registration for '" + filterName +"'. Check to ensure the Filter is only configured once.");
        }
        registration.setAsyncSupported(isAsyncSecuritySupported());
        EnumSet<DispatcherType> dispatcherTypes = getSecurityDispatcherTypes();
        registration.addMappingForUrlPatterns(dispatcherTypes, !insertBeforeOtherFilters, "/*");
    }

    /**
     * Returns the {@link DelegatingFilterProxy#getContextAttribute()} or null
     * if the parent {@link ApplicationContext} should be used. The default
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.