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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -