Do not set the path
attribute in a context.xml
file.
Instead, re-name the WAR file to be appname.war
. In your case, it sounds like the WAR file has to contain version information, so you need to do things a little bit differently.
You were on the right track using conf/Catalina/localhost/ROOT.xml
. This will set the context path for the application to "" (empty string, the "root" web application). If you want the application to be deployed under /test
, then you need to re-name ROOT.xml
to test.xml
.
For the docBase
, you need to have the correct WAR filename in there; no wildcards or anything like that are acceptable. You should use the fully-qualified path to your WAR file if possible. Also, the WAR file should not be in Tomcat's webapps/
directory, or you'll end up deploying the application twice on to different context paths (/test
and /test-1.2.3.4
).