java - tuckey urlrewrite not working for query variable in url-rewrite -
i using tuckey urlrewrite filter clean url in jsf on glassfish. following rule of filter (which not working):
<rule> <from>^/user/(.*)$</from> <to>%{context-path}/faces/testuser.xhtml?username=$1</to> </rule>
i getting http-404, requested resource () not available.
the filter works when give "to" tag follows (i.e. type=redirect):
<to type="redirect">%{context-path}/faces/testuser.xhtml?username=$1</to>
another rule working fine forward:
<rule> <from>/home</from> <to>faces/index.xhtml</to> </rule>
following filter configuration in 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>
any idea, how work out?
when changed rule follows, working fine:
<rule> <from>^/user/(.*)$</from> <to>/faces/testuser.xhtml?username=$1</to> </rule>
Comments
Post a Comment