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"

This basically tells tomcat, that if any request comes for http://localhost:8080/myApp , serve the files from the location ‘c:\Test\myAppNewLocation’.

Uday Ogra

Connect with me at and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *