Securing web application's URL access
HttpServletRequest
is the starting point of a Java web application. To configure web security, you need to set up a filter that provides various security features. To enable Spring Security, add filter and their mapping in the web.xml
file.
The first step – web.xml
The first step is to configure DelegatingFilterProxy
instance in web.xml
while securing the web application's URL access with Spring Security.
In the web.xml
file, you'll find the following code:
<!—Spring Security --> <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> ...
Get Spring: Developing Java Applications for the Enterprise now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.