Configuring filters

The configuration of security starts with adding the filters in the web.xml file, as shown in the following code block:

    <filter> 
      <filter-name>springSecurityFilterChain</filter-name> 
      <filter-class>
org.springframework.web.filter.DelegatingFilterProxy </filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

The configuration now enables us to use the Spring Security Framework. The configured DelegatingFilterProxy class requests the filter implementation defined as a bean in the application context. In our case, the bean named springSecurityFilterChain is created by the namespace to handle the web security. Once the configuration is done, we are ready to use the <http> element to configure the security.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.251.154