title: Specifying external error pages for JSF applications
body: <p>I'm currently maintaining a legacy ICEFaces 1.8.2 web application and I was wondering if I could define external URL's inside its <code>web.xml</code> file for whenever the application generates an error.</p>
  
  <p>The main reason of course is not to show a customer the default Tomcat 6 error page. Also, I can't include the content inside my application's <code>.war</code> files because another department in my company is managing the content of those pages.</p>
  
  <p>In particular, I'm interested in showing custom pages for errors 404, 500 and 503.</p>
  
  <p>I tried doing this modification on the application's <code>web.xml</code> file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;error-page&gt;
      &lt;error-code&gt;500&lt;/error-code&gt;
      &lt;location&gt;http://myproduction-site.com/error/HTTP_INTERNAL_SERVER_ERROR.html&lt;/location&gt;
  &lt;/error-page&gt;
  &lt;error-page&gt;
      &lt;error-code&gt;404&lt;/error-code&gt;
      &lt;location&gt;http://myproduction-site.com/error/HTTP_NOT_FOUND.html&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>However, I think its illegal to specify those values inside the <code>web.xml</code> file.</p>
  
  <p>If it helps, there are a couple Apache servers in front of my Tomcat 6 servers doing load balancing with sticky sessions. Would it be possible to instruct the Apache servers to redirect to these pages whenever an error occurs inside the Tomcat servers?</p>
  
  <p>Is there any other alternative I may not be considering?</p>
  
  <p>I thank you for your time and help!</p>