InterviewSolution
| 1. |
What Is The Delegating Filter Proxy? |
|
Answer» Spring’s DELEGATINGFILTERPROXY provides the LINK between web.xml and the application context. In Spring Security, the filter classes are ALSO Spring BEANS defined in the application context and thus able to take advantage of Spring’s rich dependency-injection facilities and lifecycle interfaces. <filter> <filter-name>myFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>myFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Spring’s DelegatingFilterProxy provides the link between web.xml and the application context. In Spring Security, the filter classes are also Spring beans defined in the application context and thus able to take advantage of Spring’s rich dependency-injection facilities and lifecycle interfaces. <filter> <filter-name>myFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>myFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> |
|