I am using an apache web server and a tomcat server for hosting few webapplications.
These webapplications not very different from one another and I want to consolidate all these webapplications into one webapp to minimize the process overheads.
The webapplications are currently being accessed with separate urls ex: localhost:8080/webapp1, localhost:8080/webapp2.
Without changing the urls is there a way that I can host a webapplication on tomcat say "singlewebapp" such that it will respond to both localhost:8080/webapp1 as well as localhost:8080/webapp2?
Let's say the webapplication is abc.war. We deploy abc.war in tomcat webapps as abc folder then we need to configure the server.xml of tomcat as follows and restart tomcat:
<Host ...> ... <Context path="/webapp1" docBase="/abc" /> <Context path="/webapp2" docBase="/abc" /> </Host>
Believe this is very useful usage for supporting white-labelling and multi-tenancy.