PrettyFaces and h: link result tag does not redirect to pure URL

My rewriting with PrettyFaces for the error page does not work for h: link, and I don't understand why.

My link should be redirected to login.xhtml, and it should be /Login.

What happens, am I missing something?

My rewind of navigation rules:

<navigation-rule>
    <from-view-id>/pageNotFound.xhtml</from-view-id> 
    <navigation-case>
        <from-outcome>login</from-outcome>
        <to-view-id>/login.xhtml</to-view-id>
        <redirect/>
    </navigation-case>
</navigation-rule>

My web.xml for handling error pages and Pretty Filter configuration:

<error-page>
    <error-code>404</error-code>
    <location>/pageNotFound.xhtml</location>
</error-page>
<filter>
    <filter-name>Pretty Filter</filter-name>
    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>Pretty Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
</filter-mapping>

My pretty-config.xml:

    <url-mapping id="login">
    <pattern value="/Login" />
    <view-id value="/login.xhtml" />
</url-mapping>

My page NotFound.xhtml:

<rich:panel style="width:50%;margin-top:100px;" header="Page Not Found.">
    <h:link value="Login page" outcome="login" />
</rich:panel>
+4
source share
2 answers

, Prettyfaces JSF one. JSF, , id. :

<h:link value="Login page" outcome="pretty:login" />

, JSF-, /login:

<h:link value="Login page" outcome="/login" />

Prettyfaces , URL- .

+4

-, JSF PrettyFaces Mappings. .

<rich:panel style="width:50%;margin-top:100px;" header="Page Not Found.">
    <h:link value="Login page" outcome="login" />
</rich:panel>

, "login" "/login", JSF . .

<rich:panel style="width:50%;margin-top:100px;" header="Page Not Found.">
    <h:link value="Login page" outcome="/login" />
</rich:panel>
0

All Articles