2、urlrewrite.xml
<urlrewrite>
<rule>
<from>/succ.html</from>
<to>/succ.jsp</to>
</rule>
</urlrewrite>
3、搭建项目
把urlrewritefilter-4.0.3.jar导入到项目lib目录下
把urlrewrite.xml导入到WEB-INF文件夹下
4、配置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>
demo 下载配置参数:
from:显示地址,可用正则表达式匹配
to:实际请求地址