This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF faces-redirect not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF faces-redirect not working" Watch "JSF faces-redirect not working" New topic

JSF faces-redirect not working

Prithvi Sehgal
Ranch Hand

Joined: Oct 13, 2009
Posts: 774
Hi All,

I know that JSF shows one page over the other and if we want to see the current page we have to append
faces-redirect either in faces-config or at the end of URL. For example in my application, i have a link and i
append faces-redirect in such away

Now i have done it in many links but it doesn't seem to be working at all. It shows something like this always

Any pointers why it is happening this way?


My Blog, Follow me on Twitter,Scjp Tips, When you score low in mocks, Generics,Scjp Notes, JavaStudyGroup
Cesar Loachamin
Ranch Hand

Joined: Dec 25, 2010
Posts: 90

Hi Prithvi
i have a link and i append faces-redirect
Do you have a link <a> or a commandLink???, If you want to use a redirect, you can append the faces-redirect = true to a outcome in the action attribute of a commandLink or commandButton, when the navigation handler not found a outcome matching a navigation case, it'll try to find a page append the extension and the path of the current page, so an example of use it could be:


When a dream is ending because to come true - OCPJP 6,7. OCE JPA EE6. MCTS
Don't get me started about those stupid light bulbs.
subject: JSF faces-redirect not working
Similar Threads
Calling servlet from JSF applications
Resource reference error
Implicit navigation redirect causing new session
JSF - Unable to call servlet
Confusing with JSF redirect