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-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
|
||||
<context-param>
|
||||
<param-name>primefaces.THEME</param-name>
|
||||
<param-value>#{sessionPreferences.currentTheme}</param-value>
|
||||
@@ -45,35 +43,42 @@
|
||||
</servlet>
|
||||
|
||||
<!-- 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-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.xhtml</url-pattern>
|
||||
</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>
|
||||
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
|
||||
<location>/error.xhtml?type=expired</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<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>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<exception-type>java.lang.RuntimeException</exception-type>
|
||||
<location>/error.xhtml?type=runtime</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<exception-type>java.net.ConnectException</exception-type>
|
||||
<location>/error.xhtml?type=sql</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<error-code>500</error-code>
|
||||
<location>/error.xhtml</location>
|
||||
@@ -84,12 +89,12 @@
|
||||
</error-page>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>1</session-timeout>
|
||||
<session-timeout>30</session-timeout>
|
||||
</session-config>
|
||||
|
||||
<!-- The Welcome File List -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>home.xhtml</welcome-file>
|
||||
<welcome-file>/home.xhtml</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
|
||||
Reference in New Issue
Block a user