source: raptor-distribution/MSIs/raptor-web/trunk/source/web/webapp/raptor-web/WEB-INF/web.xml @ 1747

Revision 1747, 7.0 KB checked in by rhyssmith, 5 years ago (diff)

Adding raptor-web v1.2.1 MSI sources

  • Property svn:executable set to *
Line 
1<?xml version = '1.0' encoding = 'ISO-8859-1'?>
2<!--
3
4    Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10            http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17
18-->
19
20<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
22
23    <description>RaptorWeb</description>
24
25
26    <!-- - defines setup that can be accessed by the entire servlet, not just spring hence why security is defined here -->
27    <context-param>
28        <param-name>contextConfigLocation</param-name>
29        <param-value>
30          /WEB-INF/config/security.xml
31      </param-value>
32    </context-param>
33
34    <filter>
35        <filter-name>springSecurityFilterChain</filter-name>
36        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
37    </filter>
38    <filter-mapping>
39        <filter-name>springSecurityFilterChain</filter-name>
40        <url-pattern>/*</url-pattern>
41    </filter-mapping>
42
43    <context-param>
44        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
45        <param-value>server</param-value>
46    </context-param>
47   
48    <!--  so that Jetty picks up the correct faces config -->
49    <listener>
50        <listener-class>
51            com.sun.faces.config.ConfigureListener
52        </listener-class>
53    </listener>
54
55
56    <!-- Use xhtml view templates saved as *.xhtml, for use with Facelets -->
57    <context-param>
58        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
59        <param-value>.xhtml</param-value>
60    </context-param>
61    <!-- Enables special Facelets debug output during development -->
62    <context-param>
63        <param-name>facelets.DEVELOPMENT</param-name>
64        <param-value>false</param-value>
65    </context-param>
66    <!-- Causes Facelets to refresh templates during development, 1 - on, -1  off -->
67    <context-param>
68        <param-name>facelets.REFRESH_PERIOD</param-name>
69        <param-value>-1</param-value>
70    </context-param>
71
72    <!-- Enforce UTF-8 Character Encoding -->
73    <filter>
74        <filter-name>charEncodingFilter</filter-name>
75        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
76        <init-param>
77            <param-name>encoding</param-name>
78            <param-value>ISO-8859-1</param-value>
79        </init-param>
80        <init-param>
81            <param-name>forceEncoding</param-name>
82            <param-value>true</param-value>
83        </init-param>
84    </filter>
85
86    <filter-mapping>
87        <filter-name>charEncodingFilter</filter-name>
88        <url-pattern>/*</url-pattern>
89    </filter-mapping>
90
91    <!-- Listener for spring -->
92    <listener>
93        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
94    </listener>
95    <listener>
96        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
97    </listener>
98    <!-- Listener, to allow Jetty serving MyFaces apps <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
99        </listener> -->
100
101    <!-- Spring web flow servlet, defines config specific to the current application instance -->
102    <servlet>
103        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
104        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
105        <init-param>
106            <param-name>contextConfigLocation</param-name>
107            <param-value>/WEB-INF/config/raptorweb-servlet.xml
108            </param-value>
109        </init-param>
110        <load-on-startup>1</load-on-startup>
111    </servlet>
112
113    <!-- allows spring security to monitor the HTTPSession, so on logout the session is released furthermore, this is required
114        to allow concurrency control e.g. 1 user session max, otherwise sessions are only every timed out -->
115    <listener>
116        <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
117    </listener>
118
119    <!-- Serves static resource content from .jar files such as spring-faces.jar -->
120    <servlet>
121        <servlet-name>Resources Servlet</servlet-name>
122        <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
123        <load-on-startup>0</load-on-startup>
124    </servlet>
125
126    <!-- Map all /resources requests to the Resource Servlet for handling -->
127    <servlet-mapping>
128        <servlet-name>Resources Servlet</servlet-name>
129        <url-pattern>/resources/*</url-pattern>
130    </servlet-mapping>
131
132    <!-- Faces Servlet -->
133    <!--<servlet> <servlet-name>faces</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> -->
134
135    <servlet>
136        <servlet-name>Faces Servlet</servlet-name>
137        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
138        <load-on-startup>1</load-on-startup>
139    </servlet>
140
141    <!-- Just here so the JSF implementation can initialize -->
142    <servlet-mapping>
143        <servlet-name>Faces Servlet</servlet-name>
144        <url-pattern>*.faces</url-pattern>
145    </servlet-mapping>
146
147
148    <!-- Richfaces config -->
149    <context-param>
150        <param-name>org.richfaces.SKIN</param-name>
151        <param-value>glassX</param-value>
152    </context-param>
153
154    <!-- Making the RichFaces skin spread to standard HTML controls -->
155    <context-param>
156        <param-name>org.richfaces.CONTROL_SKINNING</param-name>
157        <param-value>enable</param-value>
158    </context-param>
159
160
161
162    <filter>
163        <display-name>RichFaces Filter</display-name>
164        <filter-name>richfaces</filter-name>
165        <filter-class>org.ajax4jsf.Filter</filter-class>
166        <init-param>
167            <param-name>maxRequestSize</param-name>
168            <param-value>10000000</param-value>
169        </init-param>
170        <init-param>
171            <param-name>createTempFiles</param-name>
172            <param-value>false</param-value>
173        </init-param>
174
175    </filter>
176    <filter-mapping>
177        <filter-name>richfaces</filter-name>
178        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
179        <dispatcher>REQUEST</dispatcher>
180        <dispatcher>FORWARD</dispatcher>
181        <dispatcher>INCLUDE</dispatcher>
182    </filter-mapping>
183
184    <!-- Spring web flow servlet mapping -->
185    <servlet-mapping>
186        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
187        <url-pattern>/spring/*</url-pattern>
188    </servlet-mapping>
189
190    <!-- Welcome Files -->
191    <welcome-file-list>
192        <welcome-file>index.html</welcome-file>
193    </welcome-file-list>
194
195</web-app>
Note: See TracBrowser for help on using the repository browser.