I'm trying to create a common error page that can be used across many projects.
I'm trying to create a separate project called ErrorProject. All of my other projects will have a Maven dependency to this ErrorProject.
Let's say that I have created project A and there is an error, how can I show an xhtml page from ErrorProject when using project A in the browser?
Currently I have this in the web.xml
of project A and error.xhtml
is a page in the ErrorProject.
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error.xhtml</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/error.xhtml</location>
</error-page>