URL Rewrite实现jsp网站伪静态
发布时间:2015-06-05 来源:查字典编辑
摘要:1、/urlrewrite/下载URLRewriteJAR包2、将jar包复制到项目WEB-INF/web.xml下3、在web.xml中配...
1、/urlrewrite/ 下载URL Rewrite JAR包
2、将jar包复制到项目WEB-INF/web.xml 下
3、在web.xml中配置URL Rewrite,代码如下:
<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>