This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a Tomcat installation which hosts half a dozen applications. I installed these applications using File URL option and specifying a context path. This works fine. A user's URL looks like this:
The problem is that I want to migrate another web application to this Tomcat installation. Coming in port 80 serves up the Tomcat Manager application. To get any of my applications served I need to specify a context path. How do I get the Tomcat to serve the newly migrated application without specifying a context path ( /pathName ) in the URL?
fyi: Tomcat comes with the default app for the default host.. the one you're seeing when you come in through port 80. [ October 18, 2004: Message edited by: Mike Curwen ]
Joined: Nov 02, 2000
"The solution in general, and for you specifically, is to use multiple hosts, and to have each host's *default* application, be an instance of the app you want."
I think I am beginning to get an idea of what you mean but I am still not clear on this. What do you mean "use multiple hosts"? I have just one machine.
I have about 6 web apps which I developed to run on this Tomcat and each has its own context path.
The web app I want to run on this Tomcat is running on another host computer and I want to move it my Tomcat. The url for this web app is well known (printed on business cards etc.) and does not have a context path in it (it ran on a Blazix application server).
When I look at my web apps listing in Tomcat Manager , it lists "welcome to Tomcat with a context path of "/". Now, this is a useful application and I use it to select "Tomcat Manager" and "Tomcat Administration". It occurs to me that I could use the default app for the web app I want to move to my Tomcat and setup a context path for the "welcome to tomcat app".
Would you happen to know how to do this? When I install the foreign web app using the file URL and leaving context path blank, Tomcat supplies the directory of the web app for a context path.
Also, How do I re-home the "welcome to Tomcat" web app?