I'm trying to use Spring Security 2.0 with a Facelets + JSF 1.2 web application.
I've tried configuring Spring Security with only JSF and it's working fine.
But when I'm using Facelets the problems come.
This my web directory structure:
So I've configured my applicationContext-security.xml as follows:
My menu.xhtml have a commandLink with an action named page1 which is mapped in my faces-config.xml navigation rules to the correct page which is: /content/area1/page1.xhtml
When I start my application and try to access the page1 link, this page is rendered without calling the spring security login form.
So when I select another item from menu, the login form is rendered in a late way.
It seems to be using an old url.
I'd like to solve this and I've already searched over internet without success.
Any help will be appreciated.
The problem was exactly with facelets! The problem was happening with JSF by itself.
Reading a Brazilian post at google groups someone give-me help where he was saying to use redirect instead of forward in my faces-config.xml file.
Indeed that solution worked for me.
I'll study more about it to give more conceptual knowledge and maybe I could write something about it to help anybody who can have the same problem.
Even though this is a problem that is more related with JSF forum, follows an example of using the redirect in faces config.