1. www.tuckey.org/urlrewrite/ download the URL Rewrite JAR package
2. Copy the jar package to the project WEB-INF/web. xml
3. Configure URL Rewrite in web. xml. 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 the pseudo-static ing rule 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 expression --> <from>/hellotag.html </from> <! -- Forward to the following JSP page, where $1 represents the string matched by the First Regular Expression --> <to type = "forward">/hellotag. jsp </to> </rule> </urlrewrite>