Tomcat 7 is in use.
Deployment to the appBase location:
Put the WAR file myapp.war under $CATALINA_HOME/webapps/
Browse to http://localhost:8080/myapp -> ok
Deployment to the non-appBase location:
Move the WAR file myapp.war to /path/to/nonappbase/
Create the context file myctx.xml under $CATALINA_HOME/conf/Catalina/localhost/ below,
<context
docBase="/path/to/nonappbase/"
reloadable="true" >
</context>
Browse to http://localhost:8080/myctx -> not found
Why did the Deployment to the non-appBase location fail?
@EDIT
According to the answer from @Mads Nielsen, it works now after the revision below,
<Context docBase="/path/to/nonappbase/myapp.war" reloadable="true" />
It's also evident that the Context element should be capitalized and in the shorthand form, i.e closed by /> instead of </Context>
The context tag should point to a specific web application, not a path to a collection of web apps.
Add myapp.war to the docBase attribute in your context, and I'm sure it'll work.
See the `docBase´ attribute documentation here: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html :
The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With