Context file for Tomcat

/ Published in: Java
Save to your folder(s)

Create an xml file with this content to tell Tomcat to use seperate folder (can be any folder, even out of tomcat root) as a root folder of your application.

Copy this file into TomcatDir/conf/Catalina/localhost

Copy this code and paste it in your HTML
  1. <?xml version='1.0' encoding='utf-8'?>
  2. <Context docBase="/path/to/youProjectDir/web"
  3. path="/youProjectURL"
  4. reloadable="true"
  5. workDir="/path/to/youProjectDir/work">
  7. <!-- Contents -->
  9. </Context>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.