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

JSF with form-based Spring Security

In this section we will implement the form-based authentication with JSF and Spring Security. Integrating Apache MyFaces with Spring Security is not as simple as Struts 2 integration.

It needs a work around. The /j_spring_security method can't be understood by ApacheMyfaces. The work around is to create a custom login method in our Managed Bean class. We will use the JSF external context class to pass the authentication request to the Spring Security Framework.

Getting ready

  • Create a new project in you Eclipse IDE: JSF_Spring_Security_Chapter_3_Recipe2
  • Do the configurations as shown in the following screenshot
  • Create a package: com.packt.jsf.beans

How to do it...

Perform the following steps to integrate JSF with Spring ...

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