2 Replies Latest reply on Jul 29, 2014 9:39 AM by atchijov-vgw

    How to make server wide error pages work?

    atchijov-vgw

      Hi,

           I want to be able to configure custom error pages which will work when none of my WARs are loaded/enabled.  Is there any additional steps to make it work, beyond configuring something like this:

       

      <subsystem xmlns="urn:jboss:domain:undertow:1.1">
          <buffer-cache name="default"/>
          <server name="default-server">
              <http-listener name="default" socket-binding="http" always-set-keep-alive="false"/>
              <https-listener name="default-s" socket-binding="https" security-realm="UndertowRealm"/>
              <host name="default-host" alias="localhost">
                  <location name="/welcome" handler="welcome-content"/>
                  <access-log prefix="access"/>
                  <filter-ref name="connection"/>
                  <filter-ref name="server-header"/>
                  <filter-ref name="x-powered-by-header"/>
              </host>
          </server>
          <servlet-container name="default">
              <jsp-config/>
          </servlet-container>
          <!--- THIS -->
          <error-pages>
              <error-page name="404-handler" code="404" path="<full path to the folder with the file>/404-error.html"/>
          </error-pages>
          <!--- THIS -->    
          <handlers>
              <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
          </handlers>
          <filters>
              <response-header name="connection" header-name="Connection" header-value="close"/>
              <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
              <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
          </filters>
      </subsystem>
      
      

      Do I need to configure any additional handlers?

       

      Cheers.