title: Tomcat URL Rewrite Filter isn't forwarding
body: <p>I'd like to forward all URLs matching the pattern: </p>
  
  <p><code>http://localhost:8080/docs/view.php?fDocumentId=([0-9]+)</code></p>
  
  <p>to: </p>
  
  <p><code>http://localhost:8080/alfresco/service/org/docs/redirect/document/properties/$1</code></p>
  
  <p>This is on tomcat, and there are two primary webapps being loaded: "docs" &amp; "alfresco".<br>
  For simplicity sake, our old legacy application (LAMP based) had all URLS with /docs as the first part of the path, same as the new application.  The reason I am forwarding to /alfresco is because of a webscript that I've developed to parse the old URL into a new URL and perform yet another redirect back to /docs, but this is irrelevant to this question.</p>
  
  <p>The new system already has the <a href="http://code.google.com/p/urlrewritefilter/" rel="nofollow">URLRewriteFilter</a> loaded, but was lacking the following specific code mentioned on the google code site (which I added) that needs to be put in webapps/docs/WEB-INF/web.xml:</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;UrlRewriteFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.tuckey.web.filters.urlrewrite.UrlRewriteFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;UrlRewriteFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
      &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>I then added the following rule to urlrewrite.xml in the same directory as web.xml:</p>
  
  <pre><code>&lt;rule&gt;
     &lt;from&gt;^/docs/view.php?fDocumentId=([0-9]+)&lt;/from&gt;
     &lt;to&gt;/alfresco/service/org/docs/redirect/document/properties/$1&lt;/to&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>I'm getting 404's when trying to go to something like <code>http://localhost:8080/docs/view.php?fDocumentId=12345</code></p>