Reverse Proxy on Tomcat

I have a Tomcat application. I now want reverse proxy some of the pages to a different server listening on a different port. On a regular apache server, I would do the following.

ProxyPass /dir1 http://localhost:1234/dir1

ProxyPassReverse /dir1 http://localhost:1234/dir1

This would pass all URLs under dir1 to the other server listening on port1234. How would I do the same thing on Tomcat?

Note that my server runs only Tomcat & Java. I do not run Apache in my setup. the server on port 1234 is separate & not Apache or Tomcat.


Noodle seems to do the trick. It's a bunch of Java classes that let you create servlets that you deploy into your Tomcat, which will run filters on the original URL and transparently redirects the request to another URL.

Other methods are available as well, the Tomcat Wiki as a collection.

Other than that, there's still Apache,Nginx, haproxy and other methods that can do it.