I need to trigger an error page in case of exceptions.
I put this code in web.xml
:
<error-page>
<exception-type>java.sql.SQLException</exception-type>
<location>/Casa da Borracha/erro.xhtml</location>
</error-page>
<error-page>
<exception-type>java.io.IOException</exception-type >
<location>/Casa da Borracha/erro.xhtml</location>
</error-page>
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/Casa da Borracha/erro.xhtml</location>
</error-page>
I have this return:
XML Parsing Error: no root element found
Remembering that my error page is at the root of the project.