Hi guys
Could enyone help with some advice on how to protect secure pages in a JSF2.0 webapp?
My basic page structure is
/pages/ - standard pages
/pages/secure - secure pages
I have implemented a Filter which uses the url-pattern "/secure/*", this Filter checks to see if the HttpSession has a value called 'isAuthenticated', if not it redirects to the login page.
My welcome-page is [http://localhost/pages/index.jsf]
This Filter works if you type in the URL manually, say:
-
http://localhost/pages/secure/myaccount.jsf
The will pass into the Filter and redirects as expected, the problem comes when I use a commandLink. Even though it has this action [action="/pages/secure/myaccount.jsf"] it loads the secure page, bypassing the Filter. I believe this is because the URL still has the following:
-
http://localhost/pages/index.jsf
How can I get the
JSF page to go through the Filter when called from a commandLink (or similar)?
Cheers in advance
KS