title: Set up 404 page in tomcat for multiple webapps
body: <p>I need to configure a custom 404 page in tomcat 6 and I want to avoid duplicating the files for each webapp (my plan B is to use symlinks but I'd like to avoid those as well).</p>
  
  <p>This <a href="https://stackoverflow.com/questions/13914575/how-to-build-server-level-custom-error-page-in-tomcat">SO thread</a> suggests creating a new 'error' webapp and putting the custom page files in there. But then I haven't figured out how I set up the custom 404 configuration in web.xml to use this url <code>http://host:port/error/NotFound.html</code></p>
  
  <p>If I set it up like this:</p>
  
  <pre><code>&lt;error-page&gt;
     &lt;error-code&gt;404&lt;/error-code&gt;
     &lt;location&gt;/error/NotFound.html&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>It's relative to the root of the particular webapp that the user is in at that time.</p>