1

I have two applications deployed in tomcat. One with name 'ROOT' and other with 'ABC' (webapps folder have two war files - ROOT.war and ABC.war). To hit the application 'ABC', I need to type full url as www.domain.com/ABC. How to I configure this so that when I hit just the domain name (www.domain.com), full url gets loaded.

Marged
  • 10,577
  • 10
  • 57
  • 99
user5146398
  • 21
  • 1
  • 3

1 Answers1

0

You should use the mechanism that is called virtual hosts for that. https://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

This way you can deploy many applications on single ip:port, and distinguish witch app should be served to the user onl by the domain.

So your urls can looks like: myapp.com and mysecondapp.com both served by the same tomcat on port 80.

Ofcourse in such case you have to make those domains to point to the localhost (easy doable on windows using hosts file, and not too complicated on linuex)

in your case localhost would point to ROOT app and the abc.com (.com is not required as it) can point to your ABC app.

Antoniossss
  • 31,590
  • 6
  • 57
  • 99