Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
136 lines (120 sloc) 4.29 KB
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Loja de Cacarecos</display-name>
<!-- ******************************************************* -->
<!-- Configuração da ordem dos Servlet Filters -->
<!-- ******************************************************* -->
<!-- OpenEntityManagerInViewFilter -->
<!-- Richfaces -->
<!-- ******************************************************* -->
<!-- Configuração do Spring -->
<!-- ******************************************************* -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/config/spring/applicationContext.xml,
/WEB-INF/config/spring/applicationContext-persistence.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- RequestContextListener listener enables spring scopes with @Scope annotation -->
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<!-- Spring (Jpa Support) - OpenEntityManagerInViewFilter -->
<filter>
<description>
Necessário para o Lazy Loading funcionar quando as entidades
gerenciadas pelo EntityManager forem utilizadas em
ManagedBeans ou em JSPs.
Um bean com o id 'entityManagerFactory' precisa existir no
applicationContext.xml. Se precisar pode ser informado um
parâmetro no filtro para indicar qual o id do bean é o
EntityManagerFactory. (Ver documentação do Spring)
</description>
<filter-name>oemiv</filter-name>
<filter-class>
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>oemiv</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- ******************************************************* -->
<!-- Configuracao do Richfaces -->
<!-- ******************************************************* -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<!--
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
-->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!-- ******************************************************* -->
<!-- Configuracao do Jsf -->
<!-- ******************************************************* -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
/WEB-INF/config/faces-config.xml,
/WEB-INF/config/services-config.xml
</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<!-- ******************************************************* -->
<!-- Configuracao da App -->
<!-- ******************************************************* -->
<!-- Maneira mais simples de evitar o ViewExpiredException -->
<error-page>
<exception-type>
javax.faces.application.ViewExpiredException
</exception-type>
<location>/index.jsp</location>
</error-page>
</web-app>
You can’t perform that action at this time.