1.
小弟为公司做网站,现在基本完成,考虑到安全性和搜索引擎抓取问题,决定使用一下urlrewrite技术,按照网上指导试了几次但是不成功,现把各项配置贴出,请各位大神指教:urlrewritefilter: 用的是urlrewritefilter-4.0.3.jarweb.xml里关于urlrewrite的配置:
<!-- urlrewrite -->
<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> 
    <!-- urlrewrite ends -->WEB-INF/urlrewrite.xml配置:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE urlrewrite  
    PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"  
    "http://tuckey.org/res/dtds/urlrewrite3.0.dtd"><urlrewrite default-match-type="wildcard">
    <rule>
        <from>/jumbo1.1/admin.html</from>
        <to type="redirect">/jumbo1.1/login.jsp</to>
    </rule>
    <rule>
        <from>/jumbo1.1/page/main/*</from>
        <to>/jumbo1.1/page/main/jumbomain.html</to>
    </rule>
</urlrewrite> 配置后输入正确的地址可以访问页面,但是地址栏还是显示原来的地址,而输入上面红字中的地址则访问不到页面,小弟对于urlrearite实在是不了解,希望大家给予指教,不胜感激。
2.小弟的这个项目是用struts2开发的,服务器上还部署过其他项目,但都被卸载了,现在开启服务器运行项目时一切正常,但是在关闭服务器时报以下异常,不知道是哪里出的问题,现在开发的项目名称是jumbo1.1:严重: The web application [/dang] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@17414c8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@7a17]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-9-15 18:38:27 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/dang1.0] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@125ee49]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@13f212a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
………………
严重: The web application [/jumbo1.1] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@1c313da]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-9-15 18:38:27 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jumbo1.1] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@4c585f]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@3de2df]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-9-15 18:38:27 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jumbo1.1] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@4c585f]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@930120]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.