Glassfish の JSF でクリーンな URL に tuckey urlrewrite フィルターを使用しています。以下は、フィルターのルールです (これは機能していません)。
<rule>
<from>^/user/(.*)$</from>
<to>%{context-path}/faces/testUser.xhtml?username=$1</to>
</rule>
HTTP-404 が発生しています。要求されたリソース () は利用できません。
次のように "to" タグを指定すると (つまり、type=redirect)、フィルターが機能します。
<to type="redirect">%{context-path}/faces/testUser.xhtml?username=$1</to>
別のルールは forward に対してうまく機能しています:
<rule>
<from>/home</from>
<to>faces/index.xhtml</to>
</rule>
以下は、web.xml のフィルター構成です。
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
任意のアイデア、それを解決する方法?