joezhang
2006-06-29 20:55
呵呵~~原来这个东西是呢写的啊,厉害!!

能讲讲实现原理吗?

banq
2006-06-30 15:11
支持国人原创!

这里还有另外一个实现tuckey:

http://tuckey.org/urlrewrite/manual/2.6/

配置案例:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.5//EN"
    "http://tuckey.org/res/dtds/urlrewrite2.5.dtd">

<!-- See the manual for configuring: http://tuckey.org/urlrewrite/manual/   -->
<!-- This filter is disabled by default in metadata/web/filter-mappings.xml -->
<urlrewrite>
    <rule>
        <from>^/user/(.*).html$</from>
        <to type="forward">/editUser.html\?username=$1</to>
    </rule>
</urlrewrite>
<p>

banq
2006-06-30 15:18
补充:也是filter原理,在web.xml加入如下filter即可:

 <filter>
        <filter-name>rewriteFilter</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
        <init-param>
            <param-name>logLevel</param-name>
            <param-value>commons</param-value>
        </init-param>
    </filter>
<p>

wolf00781
2007-04-06 12:19
不知道当鼠标放到链接上时怎么能够显示www.xx.com/ss那,用过滤器就可以解决这个问题吗.还请 banq给与解答.现在我给这个问题给搞的是憔悴的很那,见笑!

猜你喜欢
2Go 上一页 1 2