gpt4 book ai didi

tomcat - 使用 Tuckey 将 url 重写映射存储在单独的文件中?

转载 作者:行者123 更新时间:2023-11-28 22:00:22 24 4
gpt4 key购买 nike

我正在尝试将 URL 重写映射存储在单独的文件中。

我找到了一些关于使用 .Net 或 Apache 的答案,但没有找到如何在 Tomcat 中使用 Tuckey 来做到这一点的方法。

有谁知道 Tuckey 是否支持此功能?

最佳答案

可以在过滤器配置中修改urlrewrite.xml路径。

可以在 WEB-INF/web.xml 文件中通过更改 confPath 参数值来完成:

<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<!-- if you need to the conf file path can be changed
it is specified as a path relative to the root of your context
(default /WEB-INF/urlrewrite.xml) -->
<init-param>
<param-name>confPath</param-name>
<param-value>/WEB-INF/urlrewrite.xml</param-value>
</init-param>
</filter>

此处的文档:http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/4.0/index.html#filterparams

关于tomcat - 使用 Tuckey 将 url 重写映射存储在单独的文件中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12522243/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com