Redirección de excepciones a la página de error.
This commit is contained in:
@@ -30,8 +30,6 @@
|
|||||||
<param-name>primefaces.FONT_AWESOME</param-name>
|
<param-name>primefaces.FONT_AWESOME</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>primefaces.THEME</param-name>
|
<param-name>primefaces.THEME</param-name>
|
||||||
<param-value>#{sessionPreferences.currentTheme}</param-value>
|
<param-value>#{sessionPreferences.currentTheme}</param-value>
|
||||||
@@ -45,35 +43,42 @@
|
|||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<!-- Map these files with JSF -->
|
<!-- Map these files with JSF -->
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>Faces Servlet</servlet-name>
|
|
||||||
<url-pattern>/faces/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>Faces Servlet</servlet-name>
|
|
||||||
<url-pattern>*.jsf</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>Faces Servlet</servlet-name>
|
|
||||||
<url-pattern>*.faces</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>Faces Servlet</servlet-name>
|
<servlet-name>Faces Servlet</servlet-name>
|
||||||
<url-pattern>*.xhtml</url-pattern>
|
<url-pattern>*.xhtml</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Filters -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>facesExceptionFilter</filter-name>
|
||||||
|
<filter-class>org.omnifaces.filter.FacesExceptionFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<!-- Filter mappings -->
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>facesExceptionFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<!-- Error pages mapping -->
|
||||||
<error-page>
|
<error-page>
|
||||||
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
|
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
|
||||||
<location>/error.xhtml?type=expired</location>
|
<location>/error.xhtml?type=expired</location>
|
||||||
</error-page>
|
</error-page>
|
||||||
<error-page>
|
<error-page>
|
||||||
<exception-type>java.sql.SQLException</exception-type>
|
<exception-type>java.sql.SQLException</exception-type>
|
||||||
|
<exception-type>org.hibernate.exception.GenericJDBCException</exception-type>
|
||||||
|
<exception-type>java.net.ConnectException</exception-type>
|
||||||
<location>/error.xhtml?type=sql</location>
|
<location>/error.xhtml?type=sql</location>
|
||||||
</error-page>
|
</error-page>
|
||||||
<error-page>
|
<error-page>
|
||||||
<exception-type>java.lang.RuntimeException</exception-type>
|
<exception-type>java.lang.RuntimeException</exception-type>
|
||||||
<location>/error.xhtml?type=runtime</location>
|
<location>/error.xhtml?type=runtime</location>
|
||||||
</error-page>
|
</error-page>
|
||||||
|
<error-page>
|
||||||
|
<exception-type>java.net.ConnectException</exception-type>
|
||||||
|
<location>/error.xhtml?type=sql</location>
|
||||||
|
</error-page>
|
||||||
<error-page>
|
<error-page>
|
||||||
<error-code>500</error-code>
|
<error-code>500</error-code>
|
||||||
<location>/error.xhtml</location>
|
<location>/error.xhtml</location>
|
||||||
@@ -84,12 +89,12 @@
|
|||||||
</error-page>
|
</error-page>
|
||||||
|
|
||||||
<session-config>
|
<session-config>
|
||||||
<session-timeout>1</session-timeout>
|
<session-timeout>30</session-timeout>
|
||||||
</session-config>
|
</session-config>
|
||||||
|
|
||||||
<!-- The Welcome File List -->
|
<!-- The Welcome File List -->
|
||||||
<welcome-file-list>
|
<welcome-file-list>
|
||||||
<welcome-file>home.xhtml</welcome-file>
|
<welcome-file>/home.xhtml</welcome-file>
|
||||||
</welcome-file-list>
|
</welcome-file-list>
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|||||||
Reference in New Issue
Block a user