• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Facelets + Spring Security

 
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

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:
...
WebContent
---- content/
-------- area1/page1.xhtml
-------- area2/page2.xhtml
----- menu.xhtml

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.

Thanks.
 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic