1 Reply Latest reply on Jun 5, 2014 2:23 AM by Miklos Gabor

    404 error page not showing for JSF pages

    David Salter Novice



      I'm deploying my app to WildFly 8 and have attempted to configure it so that a nice 404 error page is given by adding the following into my web.xml




      This works fine when I try to access non-JSF pages that don't exit.  For example if I attempt to access a page called IDoNotExist.html, then my error page is displayed correctly.


      If however, I attempt to access a JSF page that doesn't exist, e.g. IDoNotExist.jsf, then I don't get my custom error page - I just get a blank page and the following error is logged to WildFly.


      WARNING [javax.enterprise.resource.webcontainer.jsf.context] (default task-8) JSF1091: No mime type could be found for file
      /IDoNotExist.jsp.  To resolve this, add a mime-type mapping to the applications web.xml.


      Note that the error log references a .JSP page whereas I attempted to acces a .JSF page.


      Is there something missing from my web.xml file?