In hindsight, let me post the details anyway. Tomcat 6.0.26 using JVM
1.6_20 on Windows.

I am trying to map http://localhost/NASApp/DealSearch/RequestServlet to
http://localhost/DealsWeb/RequestServlet

<<<<< ROOT Web.xml >>>>>>>>>>>>>>
<web-app xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";   version="2.5">

        <display-name>Welcome</display-name>
        <description>Welcome</description>
        <filter>
                <filter-name>UrlRewriteFilter</filter-name>
        
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter
-class>
                <init-param>
            <param-name>logLevel</param-name>
            <param-value>TRACE</param-value>
        </init-param>
        </filter>
        <filter-mapping>
                <filter-name>UrlRewriteFilter</filter-name>
                <url-pattern>/*</url-pattern>
                <dispatcher>REQUEST</dispatcher>
                <dispatcher>FORWARD</dispatcher>
        </filter-mapping>       

</web-app>

<<<<< urlrewrite.xml >>>>>>>>>>>>>>
<urlrewrite>

    <rule>
        <from>/test/status/</from>
        <to type="redirect">%{context-path}/rewrite-status</to>
    </rule>

    <outbound-rule>
        <from>/rewrite-status</from>
        <to>/test/status/</to>
    </outbound-rule>

        <rule match-type="wildcard">
           <from>/NASApp/DealSearch/**</from>
           <to context="DealsWeb">/$1</to>
        </rule>
</urlrewrite>

The above works when running in a separate web application from ROOT. I
removed the "ROOT" application and added my own custom root application
called URLRewrite with the same configuration. Only difference is the
addition of the context element in server.xml.

Thanks.



-----Original Message-----
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, July 26, 2010 10:38 AM
To: Tomcat Users List
Subject: RE: URLRewrite filter loading twice..Not finding context second
time

> From: john.rana...@thomsonreuters.com
> [mailto:john.rana...@thomsonreuters.com]
> Subject: URLRewrite filter loading twice..Not finding context second 
> time
> 
> Any idea what Tomcat is doing?

It's doing whatever it's been told.  Unfortunately, you haven't told
*us* much.

Tomcat version?  JVM version?  Platform?  Contents of
ROOT/WEB-INF/web.xml?  Contents of ROOT/WEB-INF/urlrewrite.xml?  URLs
you're trying?

You should also enable the access log and see what's actually coming
into Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to