需要使用Tuckey过滤器在URL重写Spring框架J2EE中的帮助吗
我在ApacheTomcat5.5上使用SpringFramework2.0的J2ee应用程序 我使用URL映射将扩展名从.jsp更改为.htm。我有一个URL,看起来像这个localhost:8080/promotion.htm?cid=12345 我想将其更改为localhost:8080/12345 有人能帮我写一条规则,使用tuckey URL rewrite filter在urlrewrite.xml中执行所需的重写吗 这就是我在web.xml中提到的需要使用Tuckey过滤器在URL重写Spring框架J2EE中的帮助吗,spring,jakarta-ee,url-rewriting,tuckey-urlrewrite-filter,Spring,Jakarta Ee,Url Rewriting,Tuckey Urlrewrite Filter,我在ApacheTomcat5.5上使用SpringFramework2.0的J2ee应用程序 我使用URL映射将扩展名从.jsp更改为.htm。我有一个URL,看起来像这个localhost:8080/promotion.htm?cid=12345 我想将其更改为localhost:8080/12345 有人能帮我写一条规则,使用tuckey URL rewrite filter在urlrewrite.xml中执行所需的重写吗 这就是我在web.xml中提到的 <filter> &
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewrite Filter</filter-class> </filter>
我所需要的只是更改到的URLhttp://localhost:8080/12345. 我不希望发生任何重定向。所有我需要的是一个干净的网址,使网址看起来整洁。我自己也尝试过很多规则,但都没有成功
如何做到这一点?在很长一段时间没有回复/评论后,我自己通过urlrewrite.xml中的以下规则实现了这一点
<rule>
<from>/([a-zA-Z0-9]{1,}$)</from>
<to >/promotion.htm?cid=$1</to>
</rule>
更多信息请点击此处: