File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Virtual Server Hosting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Virtual Server Hosting" Watch "Virtual Server Hosting" New topic

Virtual Server Hosting

Patrick McDonogh
Ranch Hand

Joined: Oct 13, 2005
Posts: 89
Hi All

I am trying to get to map to a web application running on tomcat. I am aware that i need to get virtual hosting working on tomcat to do this.

I have a icsmarts.war file that holds the application.

Here are the steps i have done.

1) Copied the icsmarts.war file to $CATALINA_HOME/webapps

2) I then added a host entry into the Catalina engine tag in the server.xml file. i.e.
<Engine name="Catalina" defaultHost="localhost">
<Host name="" appBase="webapps/icsmarts"/>

3) Created the directory mkdir $CATALINA_HOME/conf/Catalina/

4) Created a blank file called ROOT.xml in $CATALINA_HOME/conf/Catalina/

5) I then copied the manager.xml file from $CATALINA_HOME/conf/Catalina/localhost

This is all.

I then start tomcat but it complains that the ROOT.xml file is empty.

Does anyone know what i should insert into this ROOT.xml file as i cannot find this in the tomcat documentation?

Also does what i am doing look right so that when a user visits they see the website?

I greatly appreciate any help on this.

Have a good day.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
I run 7 virtual hosts on one Tomcat 5.5.9. Your appBase needs to be an absolute file system path to the directory, NOT a relative one.

The appBase directory should then contain a ROOT subdirectory where you place your welcome file such as index.html.

I agree. Here's the link:
subject: Virtual Server Hosting
It's not a secret anymore!