Introduction
We learned the basics of security in Chapter 1, Basic Security, which helped us to understand Spring Security better and also the origin of the Spring Security component in the Spring Framework.
In this chapter, let's see how Spring Security can be used to authenticate users in a Struts 2 framework-based web application.
Apache Struts 2 can be integrated with JSF and Spring. It is a very flexible POJO Action-based MVC framework. POJO itself performs the role of an action class to fulfill the requests. Struts 2 is derived from another framework called WebWork and it works with servlet filters, which intercept the request and response.
Exploring the Spring package
You can download the JARs from MAVEN directly or add the dependency in your POM file.
We prefer to use the latest JARs 3.1.4 from http://mvnrepository.com/artifact/org.springframework.security/spring-security-core/:
<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring...