开发者

UrlRewriteFilter outbound-rule isn't applied to form

开发者 https://www.devze.com 2023-03-05 17:25 出处:网络
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.

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号