O'Reilly logo

Spring Security 3.x Cookbook by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating Struts 2 with Spring Security

Let's first set up a Struts 2 application and integrate Spring Security with it.

Getting ready

  • Eclipse Indigo or higher version
  • JBoss as server
  • Struts 2 JARs: 2.1.x
  • Spring-core JARs 3.1.4. Release and Spring-Security 3.1.4.Release
  • Struts 2 Spring plugin jar

How to do it...

In this section, we will learn how to set up the Struts 2 application with form-based Spring Security:

  1. In your Eclipse IDE, create a dynamic web project and name it Spring_Security_Struts2.
  2. Create a source folder at src/main/java.
  3. Create a struts.xml file under the source folder src/main/java.
  4. To integrate Struts 2 with the Spring application, add the application-context.xml file reference here.
  5. Add the Struts filter mapping in web.xml. Spring listener ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required