Installing a virtual host outside of Tomcat 8 webapps

To not have to install websites within tomcatX/webapps do the following. I chose to install connected to localhost.  The name for this site is fileSystem so:

  • create a fileSystem.xml file for this app and place it in %TOMCAT_HOME%\conf\Catalina\localhost
  • the contents of fileSystem.xml is
<Context displayName="fileSystem" 
     docBase="/home/roye/tomcat/fileSystem"
     path="/fileSystem"
     reloadable="true" />
  • docBase contains the traditional directory structure
  • stop and start, or reload tomcat
  • the resulting URL is http://localhost:8080/fileSystem
  • to link to servlets within a html page the link is e.g.

Leave a Reply