title: tomcat webapp - where do i store permanent files
body: <p>I am working on an old Java web application that runs on Tomcat.  I know that typically you run web apps from the webapps directory which uses Tomcat's default server configuration (server.xml).  This particular app is deployed to a different directory using a custom server.xml so it requires 1 tomcat instance per app.  I believe the reason it was initially setup that way is due to the fact that each web app produces files that must be saved between redeploys of the application. </p>
  
  <p>My question is - is there a way to use the webapps directory but also save certain files from being wiped out during a redeploy of the application?</p>
  
  <p>Here's the layout of our current tomcat</p>
  
  <pre><code>tomcat/
    servers/
      ourapp/
        output/   # heres where the files go that we save
        ourapp/   # this is the actual webapp (exploded WAR file)
          WEB-INF/
          ...
  </code></pre>
  
  <p>I want something like</p>
  
  <pre><code>tomcat/
    webapps/
      ourapp/
        output/  # but this is saved between redeploys
        WEB-INF/
      ...
  </code></pre>
  
  <p>My end goal is to get away from custom server.xml's so we deploy multiple apps on one tomcat instance.  Just in case in matters - we're on Tomcat 6.</p>