0

I am trying to configure jsf navigation rule according to jee tutorial, but I have a problem. Here is my navigation rule in faces-config.xml

<navigation-rule>
<from-view-id>/login.jsf</from-view-id>
<navigation-case>
    <from-action>#{userBean.login}</from-action>
    <from-outcome>success</from-outcome>
    <to-view-id>/home.jsf</to-view-id>
</navigation-case>
<navigation-case>
    <from-action>#{userBean.login}</from-action>
    <from-outcome>failure</from-outcome>
    <to-view-id>/failure.jsf</to-view-id>
</navigation-case>
</navigation-rule>

After trying to login, method userBean.login() returns String "success" but nothing happens and in log I have warning:

JSF1064: Unable to find or serve resource, /pages/success.xhtml.

So why jsf tries to find success.xhtml instead of home.xhtml?

user3056857
  • 113
  • 4
  • do u get any errors like java.lang.NullPointerException at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome(NavigationHandlerImpl.java:1204? Are you using seam-faces by any chance? – Mahendran Ayyarsamy Kandiar Dec 03 '15 at 19:07
  • @Mahendran Ayyarsamy Kandiar No NullPointerException and no errors. I use primefaces/jsf on wildfly 9.0.2 – user3056857 Dec 03 '15 at 19:11

0 Answers0