This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes Problem with Spring Security Login Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem with Spring Security Login" Watch "Problem with Spring Security Login" New topic

Problem with Spring Security Login

Ismael Rodriguez

Joined: Dec 26, 2012
Posts: 6
I'm developing login page with spring security but when I start my project automatically redirected to the login page. I've a in my web.xml with redirect to index.xhtml, why is redirect to login.xhtml?



Petri Kainulainen

Joined: Dec 29, 2012
Posts: 2

The reason of this behavior is that anonymous users do not have roles. In other words, the problem is found from your application context configuration file:

You should use the permitAll() expression here. Also, you need to enable expressions since they are disabled by default. The relevant part of your application context configuration file should look as follows:

I agree. Here's the link:
subject: Problem with Spring Security Login
Similar Threads
HTTP Status 404 - /j_spring_security_check
JSF 1.2 + Authentication with Spring Security 3.0.5
Exception while running the Spring example
Spring security and jsf Integration
login form with database and spring security