Running an app inside tomcat which is not present in it’s webroot
Suppose a user wants to keep files in some external path(IIS webroot for example) and still be able to access them by hitting tomcat(without keeping files in tomcat’s webroot).
In tomcat we can do such mappings. For example this is a myApp.xml file placed in conf/catalina/localhost folder of tomcat.
<Context docBase="c:\Test\myAppNewLocation" privileged="false" reloadable="false" crossContext="false" debug="0"> </Context>
This basically tells tomcat, that if any request comes for http://localhost:8080/myApp , serve the files from the location ‘c:\Test\myAppNewLocation’.