I have started using Tuckey's UrlRewriteFilter on my JSF 2.0 web application and it works well except for a form on my site's home page.
Here is the outbound rule:
<outbound-rule>
<from>^.*?/faces/search.xhtml(.*)$</from>
<t开发者_运维知识库o>%{context-path}/search$1</to>
</outbound-rule>
The form's action attribute is sent to the browser verbatim:
<form action="/my-context-path/faces/search.xhtml" method="get" onSubmit="return geocode(this);">
I have some hyperlinks (h:link in JSF) on the home page for predefined searches and they are being rewritten just fine according to the outbound rule. I even tried removing the ^ then both the ^ and $, but with no change. Any ideas?
精彩评论