0

How to deploy the web app on root conditionally e.g. if I run tomcat using localhost it should give its default application which has manager etc. links but if run the same using IP it should show my application as root?

Ullas Hunka
  • 2,119
  • 1
  • 15
  • 28
  • Please refer https://stackoverflow.com/questions/18413723/deploy-war-file-on-tomcat-and-run-without-project-name – Sumesh TG Mar 22 '18 at 07:32
  • Yes I know this but this doesn't solve my problem. I want localhost to run same as it is. But when run on ip or url it should run the other app. I have done this using redirect inside index.jsp of root. But its temporary solution while I want to use it as mask. – Ullas Hunka Mar 22 '18 at 07:46
  • If you run with `localhost` or `ip`, its one and the same thing. So until and unless you want your `localhost` to point to a default `project`, there is nothing that can be done, AFAIK. – hiren Mar 22 '18 at 07:48
  • Try creating virtual hosts with tomcat – Sumesh TG Mar 22 '18 at 08:00

0 Answers0