Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

Place Apache in front of your Tomcat and use mod_jk to talk to your tomcat. You can then use all the power and features of Apache, as Tomcat really doesn't have any that you don't program yourself.

share|improve this answer
    
Thanks, I'll keep that in mind for future use. – pompo Aug 18 '09 at 12:49

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.