1, www.tuckey.org/urlrewrite/download URL Rewrite jar Package
2. Copy jar package to project Web-inf/web.xml
3, in the Web.xml configuration URL Rewrite, the code is as follows:
<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>
4. Add pseudo-static mapping rules Urlrewrite.xml
<?xml version= "1.0" encoding= "GBK"?>
DOCTYPE urlrewrite Public "-//tuckey.org//dtd urlrewrite 3.2//en" "Http://tuckey.org/res/dtds/urlrewrite3.2.dtd" > <urlrewrite> <rule> <!--all requests configured with the following regular expressions--> <from>/hellotag.html</from> <!--will be for Ward to the following JSP page, where the string representing the first regular expression above--> <to type= "forward" >/hellotag.jsp</to> </rule> </ur Lrewrite>