Jsf 2 jsf2。can';t使用命令按钮重定向

Jsf 2 jsf2。can';t使用命令按钮重定向,jsf-2,primefaces,Jsf 2,Primefaces,我有commandButton,它将我从“login.xhtml”重定向到“home.xhtml”。登录成功,但重定向不起作用;没有任何错误 faces-config.xhtml <navigation-rule> <from-view-id>/public/login.xhtml</from-view-id> <navigation-case> <from-action>#{userLo

我有commandButton,它将我从“login.xhtml”重定向到“home.xhtml”。登录成功,但重定向不起作用;没有任何错误

faces-config.xhtml

<navigation-rule>
        <from-view-id>/public/login.xhtml</from-view-id>
        <navigation-case>
        <from-action>#{userLoginBean.login}</from-action>
            <from-outcome>login</from-outcome>
            <to-view-id>/public/home.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
以及.xhtml:

<f:facet name="footer">
                <center>
                    <p:commandButton  value="Se connecter" action="#{userLoginBean.login}" />
                </center>
            </f:facet>

尝试在没有任何业务逻辑的情况下重定向到您的页面,即返回“登录”;并验证下一页的位置

<f:facet name="footer">
                <center>
                    <p:commandButton  value="Se connecter" action="#{userLoginBean.login}" />
                </center>
            </f:facet>