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 ?
According to the Tomcat Wiki, you must place your war file outside of
webapps
to prevent double deployment. ThedocBase
pointing to the full path of your WAR file, something like this: