101 lines
3.3 KiB
XML
101 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
|
|
|
|
|
|
<context-param>
|
|
<description>
|
|
Define the value returned by Application.getProjectStage(). Allowed values: Production, Development,
|
|
UnitTest, SystemTest, Extension. Default value is Production.
|
|
</description>
|
|
<param-name>javax.faces.PROJECT_STAGE</param-name>
|
|
<param-value>Development</param-value>
|
|
</context-param>
|
|
|
|
<!-- Definir este parámetro es más cómodo y más visual que usar el <ui:remove> de Facelets. -->
|
|
<context-param>
|
|
<description>Do not render comments in facelets (xhtml) pages. Default is false.</description>
|
|
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
|
|
<param-value>true</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
|
|
<param-value>client</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
|
|
<param-value>.xhtml</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<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>
|
|
</context-param>
|
|
|
|
<!-- JSF mapping -->
|
|
<servlet>
|
|
<servlet-name>Faces Servlet</servlet-name>
|
|
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
|
<load-on-startup>1</load-on-startup>
|
|
</servlet>
|
|
|
|
<!-- Map these files with JSF -->
|
|
<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>
|
|
</error-page>
|
|
<error-page>
|
|
<error-code>401</error-code>
|
|
<location>/error.xhtml?type=expired</location>
|
|
</error-page>
|
|
|
|
<session-config>
|
|
<session-timeout>30</session-timeout>
|
|
</session-config>
|
|
|
|
<!-- The Welcome File List -->
|
|
<welcome-file-list>
|
|
<welcome-file>/home.xhtml</welcome-file>
|
|
</welcome-file-list>
|
|
|
|
</web-app>
|