1

I'm using Tomcat to host a few web apps. They are all running on their respective context roots. Let's call them:

A: https://example.com/A
B: https://example.com/B

I have nothing running at / (ROOT). I'd like to have app "A" be accessible from / but for historical reasons (existing apps that haven't been updated), I need to keep it running at /A as well.

What's the best way to do this? I've tried to add a symbolic link from ROOT to A in the webapps directory but Tomcat ends up loading the app twice. I can't just have two running instances of the same app - we need one single instance accessible from both /A and /. Also, note that we have mobile apps and custom scripts that are all using this app so a pure HTML redirect won't work.

  • If HTTP 302 redirect / => /A is out of the question, I'd say your best bet would be to add a reverse proxy (e.g. Nginx, Apache, Varnish) to handle the URL mappings. – Jukka Dec 22 '15 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.