-
Notifications
You must be signed in to change notification settings - Fork 36
/
web.xml
136 lines (120 loc) · 4.29 KB
/
web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?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>