Mark, you are right, I made it work using a form like:
The above code is just a dummy code, but is the base that I used to made it works. But the problem with that form was that use <form> tag instead <h:form> tag from jsf core libraries results in a warning in the final html page, the warning said that I am using a tag (<form>) not described in my taglibs. So I try the loginBean way, using some pasted code from a forum. The LoginBean approach worked but had two problems, the first one is when that the spring authentication process is not doing well, I can realise about that because I could access to resources authorised for admin role users only with a user which has only user role.
Last night I was reading some documentation, and I understood that I don't understand what I am doing!! hehehehe So I propose to put some things clear:
- JSF/Richfaces are my MVC framework
- Spring security is my framework for authentication and authorisation.
So if I take the approach of think on they individually, why my navigation rules established on my faces-config.xml doesn't works properly? Why when I put an <h:commandLink> with an action pointed to a from-outcome tag in my navigation rule and I clicked on it the rendered page looks ugly and the url showed in my browser looks like:
http://localhost:8080/barmanagement//faces/home.xhtml when it must be pointing to /faces/admin/admin_home.xhtm.
I suppose that I am doing something wrong but I dont know what, so I need some kind of roadmap to properly configure my webapp and have a few example links some secured and some other not to see how spring works in that cases.
You could see my current web.xml, faces-config.xml, applicationSecurity-context.xml and login.xhmtl files in the bellow link to a spanish forum post.
http://www.forosdelweb.com/f45/integracion-spring-security-3-jsf2-richfaces-4-hibernate-910209/
Regards and thanks,
JM
PS: I hope to be clear, but my English don't help! hehehe