Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to deploy a WAR as the root application on a Tomcat server. I can manage to do it by adding a line in the server.xml configuration file, but I'd like to externalize that from the server configuration. Note that I also should not modify the WAR in any way.

Documentation seems to indicate that I should be able to do that by adding a ROOT.xml file in ${CATALINA_HOME}/[Engine]/[hostname]/. I tried with the following content :

<Context docBase="webappname" path="" />

but it is not working (I still see the defaut Tomcat webpage).

What am I doing wrong ?

share|improve this question
up vote 1 down vote accepted

According to the Tomcat Wiki, you must place your war file outside of webapps to prevent double deployment. The docBase pointing to the full path of your WAR file, something like this:

# ls -l /opt/tomcat6/
-rw-r--r-- 1 root    root    19962865 Aug 19 10:56 cas.war

# cat conf/Catalina/localhost/ROOT.xml 
<Context docBase="/opt/tomcat6/cas.war" path="" />
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.