Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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