日期:2014-05-16 浏览次数:20396 次
<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>
    </filter-mapping><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN"
        "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
<!--
    Configuration file for UrlRewriteFilter
    http://tuckey.org/urlrewrite/
-->
<urlrewrite>
    <!--<rule>-->
        <!--<note>-->
            <!--action-->
        <!--</note>-->
        <!--<from>^/([_a-zA-Z]+[_0-9a-zA-Z-/]*[_0-9a-zA-Z]+)$</from>-->
        <!--<to type="redirect">/$1.action</to>-->
    <!--</rule>-->
    <rule>
        <note>
            jsp
        </note>
        <from>^/([_a-zA-Z]+[_0-9a-zA-Z-/]*[_0-9a-zA-Z]+).html$</from>
        <to type="forward">/$1.jsp</to>
    </rule>
    <outbound-rule>
        <note>
            jsp
        </note>
        <from>^/([_a-zA-Z]+[_0-9a-zA-Z-/]*[_0-9a-zA-Z]+).jsp$</from>
        <to type="forward">/$1.html</to>
    </outbound-rule>
    <outbound-rule>
        <note>
            action
        </note>
        <from>^/([_a-zA-Z]+[_0-9a-zA-Z-/]*[_0-9a-zA-Z]+).action$</from>
        <to>/$1</to>
    </outbound-rule>
</urlrewrite><a href="<%=request.getContextPath() + response.encodeURL("/jsp/home.jsp")%>">URLRewriter 修正页面URL</a>
		<a href="<c:url value="/jsp/home.html" />">URLRewriter 修正页面URL</a>