Tomcat – Redirecting Tomcat requests to another host

redirecttomcat

How is it possible to redirect requests Tomcat 5.5 receives with certain URL match to another Tomcat instance on another host, like I could do on an Apache host with rewrite rules?

Example:
I'd like to redirect all requests on http://example.com:8080/xmpl to http://example.org:8080/xmpl (with full path and GET parameters), but leave http://example.com:8080/regular for Tomcat at example.com on port 8080.
Here example.com and example.org are completely different hosts.

Best Answer

In the end, we used a placeholder webapp with URL Rewrite Filter, http://tuckey.org/urlrewrite/ and the filter configuration from Erik Isaksson. This spared us from rebooting the server, which was quite important for the specific case.