Java Jsf URL重写不起作用

Java Jsf URL重写不起作用,java,jsf,jsf-2,url-rewriting,tuckey-urlrewrite-filter,Java,Jsf,Jsf 2,Url Rewriting,Tuckey Urlrewrite Filter,我想隐藏我的页面扩展而不使用漂亮的面孔,因为它很难使用,而且我对使用它感到困惑,现在我正在使用tuckey 我有这个链接: localhost1:8080/control/login.xhtml so i want it like : localhost1:8080/control/login 我的代码是: <urlrewrite> <rule> <note> The rule means that requests to /tes

我想隐藏我的页面扩展而不使用漂亮的面孔,因为它很难使用,而且我对使用它感到困惑,现在我正在使用tuckey

我有这个链接: localhost1:8080/control/login.xhtml

so i want it like : localhost1:8080/control/login
我的代码是:

<urlrewrite>

<rule>
    <note>
        The rule means that requests to /test/status/ will be redirected to /rewrite-status
        the url will be rewritten.
    </note>
    <from>login.xhtml</from>
    <to type="redirect">control/login</to>
</rule>

由于要重定向到控件/登录,还需要定义一个导航规则,将此url映射到xhtml页面

范例

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">


<navigation-rule>
<from-view-id>*.xhtml</from-view-id>
<navigation-case>
    <from-outcome>control/login</from-outcome>
    <to-view-id>login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>


</faces-config>

*.xhtml
控制/登录
login.xhtml

没有新的情况发生,我已经在faces配置中对其进行了更改,但仍然有相同的链接给我404
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">


<navigation-rule>
<from-view-id>*.xhtml</from-view-id>
<navigation-case>
    <from-outcome>control/login</from-outcome>
    <to-view-id>login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>


</faces-config>