title: How to set a default error page for WildFly server?
body: <p>I'm using Wildlfy Application Server 8.2.0.Final. I have deployed an app.war file. In app's web.xml I can specify a home page and error pages. Which works perfectly for </p>
  
  <blockquote>
    <p>local-host.com/app</p>
  </blockquote>
  
  <p>url and for incorrect urls relative to it. When i type something like </p>
  
  <blockquote>
    <p>local-host.com/app/xxx</p>
  </blockquote>
  
  <p>I can see the specified page - that's great. </p>
  
  <p>But when I enter </p>
  
  <blockquote>
    <p>local-host.com</p>
  </blockquote>
  
  <p>I can see WildFly's default page and when I type an incorrect one </p>
  
  <blockquote>
    <p>local-host.com/xxx</p>
  </blockquote>
  
  <p>I will se just <code>404 - Not Found</code></p>
  
  <p>I would love to use same welcome and error pages from my app for these urls. I have found a reasonable solution for the welcome page here: <a href="https://stackoverflow.com/questions/5709223/how-to-auto-direct-to-my-web-application-from-root-context-in-jboss">How to auto direct to &quot;my web application&quot; from &quot;root (/)&quot; context in JBoss?</a> which works fine, but I couldn't find out what can I do with errors.</p>
  
  <p>Zigac's solution works great and mine "manual" solution works as well, but there is still an issue:</p>
  
  <p>What to do with </p>
  
  <blockquote>
    <p>local-host.com/META-INF </p>
  </blockquote>
  
  <p>url - I still get server's default error message for it even despite that the url is under app's root?</p>
  
  <p>Thx.</p>