<
From version < 20.1 >
edited by Marius Dumitru Florea
on 2018/08/29
To version < 21.1 >
edited by Marius Dumitru Florea
on 2018/08/29
>
Change comment: Uploaded new attachment "web-9.7RC1.xml", version 1.1

Summary

Details

web-9.7RC1.xml
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.mflorea
Size
... ... @@ -1,0 +1,1 @@
1 +15.5 KB
Content
... ... @@ -1,0 +1,397 @@
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +
3 +<!--
4 + * See the NOTICE file distributed with this work for additional
5 + * information regarding copyright ownership.
6 + *
7 + * This is free software; you can redistribute it and/or modify it
8 + * under the terms of the GNU Lesser General Public License as
9 + * published by the Free Software Foundation; either version 2.1 of
10 + * the License, or (at your option) any later version.
11 + *
12 + * This software is distributed in the hope that it will be useful,
13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 + * Lesser General Public License for more details.
16 + *
17 + * You should have received a copy of the GNU Lesser General Public
18 + * License along with this software; if not, write to the Free
19 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 +-->
22 +
23 +<web-app xmlns="http://java.sun.com/xml/ns/javaee"
24 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
26 + version="3.0">
27 +
28 + <display-name>XWiki</display-name>
29 + <description>XWiki Application</description>
30 +
31 + <!-- Main Restlet Application using Restlet's JAX-RS extension. -->
32 + <context-param>
33 + <param-name>org.restlet.application</param-name>
34 + <param-value>org.xwiki.rest.internal.XWikiRestletJaxRsApplication</param-value>
35 + </context-param>
36 +
37 + <!-- Filter in charge of deciding whether to call the ResourceReferenceHandler Servlet (currently used to handle new
38 + Resource Types registered as Components) or instead to continue with the rest of the filters and mappings below.
39 + In the future, the goal is to move more and more Resource handling using the ResourceReferenceHandler Servlet and
40 + remove the Struts Action Servlet at some point.
41 +
42 + Note: it is important that this filter be the first filter declared (and thus executed). -->
43 + <filter>
44 + <filter-name>RoutingFilter</filter-name>
45 + <filter-class>org.xwiki.resource.servlet.RoutingFilter</filter-class>
46 + </filter>
47 +
48 + <!-- Filter that sets a custom encoding to all requests, since usually clients don't specify
49 + the encoding used for submitting the request, so by default containers fall back to the
50 + encoding globally configured in their settings. This allows XWiki to use a custom encoding,
51 + without affecting the whole container (and the other applications hosted). -->
52 + <filter>
53 + <filter-name>Set Character Encoding</filter-name>
54 + <filter-class>org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter</filter-class>
55 + <!-- The encoding to use. This must be the same as the one in xwiki.cfg (hopefully only one
56 + encoding will be used later). -->
57 + <init-param>
58 + <param-name>encoding</param-name>
59 + <param-value>UTF-8</param-value>
60 + </init-param>
61 + <!-- Whether to ignore and override the encoding specified by the client, when this actually
62 + happens. For example, AJAX requests made through XmlHttpRequests specify UTF-8. When this
63 + is set to false, the custom encoding is used only when there wasn't any encoding specified
64 + by the client. -->
65 + <init-param>
66 + <param-name>ignore</param-name>
67 + <param-value>false</param-value>
68 + </init-param>
69 + </filter>
70 +
71 + <!-- A filter that allows requests to be saved and reused later. For example when the current request contains an
72 + expired authentication token, and the authorization module redirects to the login page, all the information sent
73 + by the client would be lost; this filter allows to save all that information, and after a successful login,
74 + injects the saved data in the new request. -->
75 + <filter>
76 + <filter-name>RequestRestorer</filter-name>
77 + <filter-class>org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter</filter-class>
78 + </filter>
79 +
80 + <!-- This filter is used to convert the HTML generated by the WYSIWYG editor to wiki syntax -->
81 + <filter>
82 + <filter-name>ConversionFilter</filter-name>
83 + <filter-class>org.xwiki.wysiwyg.filter.ConversionFilter</filter-class>
84 + </filter>
85 +
86 + <!-- A filter that dispatches requests to the right action depending on the button pressed in the editing form. This
87 + is needed when javascript is disabled, since the browser cannot send the form data to different URLs depending on
88 + the button pressed. -->
89 + <filter>
90 + <filter-name>ActionDispatcher</filter-name>
91 + <filter-class>com.xpn.xwiki.web.ActionFilter</filter-class>
92 + </filter>
93 +
94 + <!-- This filter is used to initialize the XWiki context before processing a request. -->
95 + <filter>
96 + <filter-name>XWikiContextInitializationFilter</filter-name>
97 + <filter-class>org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter</filter-class>
98 + </filter>
99 +
100 + <!-- This filter is used to initialize the XWiki context before processing a REST request. -->
101 + <filter>
102 + <filter-name>XWikiXmlRpcContextInitializationFilter</filter-name>
103 + <filter-class>org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter</filter-class>
104 + <!-- A parameter used to identify the request as a an XML-RPC call -->
105 + <init-param>
106 + <param-name>mode</param-name>
107 + <param-value>2</param-value>
108 + </init-param>
109 + </filter>
110 +
111 + <!-- This filter is used to add the 'Content-Type-Script' header to the HTTP response. -->
112 + <filter>
113 + <filter-name>Set Content-Script-Type</filter-name>
114 + <filter-class>org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter</filter-class>
115 + <init-param>
116 + <param-name>name</param-name>
117 + <param-value>Content-Script-Type</param-value>
118 + </init-param>
119 + <init-param>
120 + <param-name>value</param-name>
121 + <param-value>text/javascript</param-value>
122 + </init-param>
123 + </filter>
124 +
125 + <!-- We need this filter because cross domain request for fonts are not allowed if some headers are not set.
126 + See https://jira.xwiki.org/browse/XWIKI-11300 for more informations. -->
127 + <filter>
128 + <filter-name>Set CORS policy for fonts</filter-name>
129 + <filter-class>org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter</filter-class>
130 + <init-param>
131 + <param-name>name</param-name>
132 + <param-value>Access-Control-Allow-Origin</param-value>
133 + </init-param>
134 + <init-param>
135 + <param-name>value</param-name>
136 + <param-value>*</param-value>
137 + </init-param>
138 + </filter>
139 +
140 + <!-- The Routing Fitler decides how to route all requests and thus must be mapped to handle all incoming requests -->
141 + <filter-mapping>
142 + <filter-name>RoutingFilter</filter-name>
143 + <url-pattern>/*</url-pattern>
144 + </filter-mapping>
145 +
146 + <!-- The encoding filter MUST always be the first one, as setting the encoding does not work after accessing the
147 + request data. -->
148 + <filter-mapping>
149 + <filter-name>Set Character Encoding</filter-name>
150 + <url-pattern>/*</url-pattern>
151 + <dispatcher>REQUEST</dispatcher>
152 + <dispatcher>INCLUDE</dispatcher>
153 + <dispatcher>FORWARD</dispatcher>
154 + <dispatcher>ERROR</dispatcher>
155 + </filter-mapping>
156 +
157 + <filter-mapping>
158 + <filter-name>RequestRestorer</filter-name>
159 + <url-pattern>/*</url-pattern>
160 + <dispatcher>REQUEST</dispatcher>
161 + <dispatcher>INCLUDE</dispatcher>
162 + <dispatcher>FORWARD</dispatcher>
163 + </filter-mapping>
164 +
165 + <filter-mapping>
166 + <filter-name>ConversionFilter</filter-name>
167 + <servlet-name>action</servlet-name>
168 + <dispatcher>REQUEST</dispatcher>
169 + <dispatcher>INCLUDE</dispatcher>
170 + <dispatcher>FORWARD</dispatcher>
171 + </filter-mapping>
172 +
173 + <filter-mapping>
174 + <filter-name>ActionDispatcher</filter-name>
175 + <servlet-name>action</servlet-name>
176 + <dispatcher>REQUEST</dispatcher>
177 + <dispatcher>INCLUDE</dispatcher>
178 + <dispatcher>FORWARD</dispatcher>
179 + </filter-mapping>
180 +
181 + <!-- TODO: This should be fixed. It's not normal that the REST module depends on the WYSIWYG module.
182 + "XWikiXmlRpcContextInitializationFilter" points to
183 + org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter -->
184 + <filter-mapping>
185 + <filter-name>XWikiXmlRpcContextInitializationFilter</filter-name>
186 + <servlet-name>RestletServlet</servlet-name>
187 + <dispatcher>REQUEST</dispatcher>
188 + <dispatcher>INCLUDE</dispatcher>
189 + <dispatcher>FORWARD</dispatcher>
190 + </filter-mapping>
191 +
192 + <filter-mapping>
193 + <filter-name>Set Content-Script-Type</filter-name>
194 + <url-pattern>/*</url-pattern>
195 + </filter-mapping>
196 +
197 + <!-- We set the CORS policy globally for webjars.
198 +
199 + TODO: We currently use a <servlet-name> mapping since we've noticed that <url-pattern> ones have no effect.
200 + The problem is described at http://stackoverflow.com/questions/31142302/getnameddispatcher-forward-and-filters-using-url-pattern
201 + Right now it means that all URLs handled by a ResourceReferenecHandler<ResourceType> will have this filter
202 + applied when it should only be applied to "webjars" URLs. We need to find a solution to fix this. It happens
203 + that at this point in time, only "webjars" URLs are handled using a ResourceReferenecHandler<ResourceType>.
204 + -->
205 + <filter-mapping>
206 + <filter-name>Set CORS policy for fonts</filter-name>
207 + <servlet-name>resourceReferenceHandler</servlet-name>
208 + <url-pattern>/webjars/*</url-pattern>
209 + <url-pattern>*.woff</url-pattern>
210 + <url-pattern>*.eot</url-pattern>
211 + <url-pattern>*.ttf</url-pattern>
212 + <dispatcher>REQUEST</dispatcher>
213 + <dispatcher>FORWARD</dispatcher>
214 + </filter-mapping>
215 +
216 + <!-- Initializes XWiki -->
217 + <listener>
218 + <listener-class>org.xwiki.container.servlet.XWikiServletContextListener</listener-class>
219 + </listener>
220 +
221 + <listener>
222 + <listener-class>org.xwiki.container.servlet.SetThreadNameServletRequestListener</listener-class>
223 + </listener>
224 +
225 + <!-- Handles Resource Types registered as Components (e.g. WebJars) -->
226 + <servlet>
227 + <servlet-name>resourceReferenceHandler</servlet-name>
228 + <servlet-class>org.xwiki.resource.servlet.ResourceReferenceHandlerServlet</servlet-class>
229 + </servlet>
230 +
231 + <servlet>
232 + <servlet-name>action</servlet-name>
233 + <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
234 + <init-param>
235 + <param-name>application</param-name>
236 + <param-value>ApplicationResources</param-value>
237 + </init-param>
238 + <init-param>
239 + <param-name>xwiki</param-name>
240 + <param-value>com.xpn.xwiki.XWiki</param-value>
241 + </init-param>
242 + <init-param>
243 + <param-name>config</param-name>
244 + <param-value>/WEB-INF/struts-config.xml</param-value>
245 + </init-param>
246 + <init-param>
247 + <param-name>debug</param-name>
248 + <param-value>2</param-value>
249 + </init-param>
250 + <init-param>
251 + <param-name>detail</param-name>
252 + <param-value>2</param-value>
253 + </init-param>
254 + <init-param>
255 + <param-name>validate</param-name>
256 + <param-value>true</param-value>
257 + </init-param>
258 + <load-on-startup>2</load-on-startup>
259 + </servlet>
260 +
261 + <servlet>
262 + <servlet-name>redirectHomeServlet</servlet-name>
263 + <servlet-class>com.xpn.xwiki.web.HomePageRedirectServlet</servlet-class>
264 + <!-- Uncomment and edit this if you want to redirect to a different home page, or if you have different mappings.
265 + Note: the URL should not start with /, because it allows the context name to be changed. If it starts with /,
266 + then it should be an absolute URL, including the application context path.
267 + <init-param>
268 + <description>The address to redirect to when the client hits the root of the application.</description>
269 + <param-name>homePage</param-name>
270 + <param-value>bin/Main/</param-value>
271 + </init-param>
272 + -->
273 + </servlet>
274 +
275 + <!-- RESTful API Restlet servlet -->
276 + <servlet>
277 + <servlet-name>RestletServlet</servlet-name>
278 + <servlet-class>
279 + org.xwiki.rest.internal.XWikiRestletServlet
280 + </servlet-class>
281 + </servlet>
282 +
283 + <!-- RESTful API mapping -->
284 + <servlet-mapping>
285 + <servlet-name>RestletServlet</servlet-name>
286 + <url-pattern>/rest/*</url-pattern>
287 + </servlet-mapping>
288 +
289 + <servlet-mapping>
290 + <servlet-name>action</servlet-name>
291 + <url-pattern>/bin/*</url-pattern>
292 + </servlet-mapping>
293 +
294 + <servlet-mapping>
295 + <servlet-name>action</servlet-name>
296 + <url-pattern>/wiki/*</url-pattern>
297 + </servlet-mapping>
298 +
299 + <servlet-mapping>
300 + <servlet-name>action</servlet-name>
301 + <url-pattern>/testbin/*</url-pattern>
302 + </servlet-mapping>
303 +
304 + <servlet-mapping>
305 + <servlet-name>action</servlet-name>
306 + <url-pattern>/xwiki/*</url-pattern>
307 + </servlet-mapping>
308 +
309 + <servlet-mapping>
310 + <servlet-name>redirectHomeServlet</servlet-name>
311 + <url-pattern>/redirect</url-pattern>
312 + </servlet-mapping>
313 +
314 + <!-- We override the mime type definition for javascript and css files, as some containers don't
315 + provide it, causing problems for javascript files containg velocity code, like
316 + fullscreen.js -->
317 + <mime-mapping>
318 + <extension>js</extension>
319 + <mime-type>text/javascript</mime-type>
320 + </mime-mapping>
321 + <mime-mapping>
322 + <extension>css</extension>
323 + <mime-type>text/css</mime-type>
324 + </mime-mapping>
325 +
326 + <!-- In order to properly work, HTML Components MUST have the proper MIME type starting with XP SP2 -->
327 + <mime-mapping>
328 + <extension>htc</extension>
329 + <mime-type>text/x-component</mime-type>
330 + </mime-mapping>
331 +
332 + <mime-mapping>
333 + <extension>bmp</extension>
334 + <mime-type>image/bmp</mime-type>
335 + </mime-mapping>
336 +
337 + <!-- MS Office mime mappings. We add these to provide out-of-the-box support for downloading Office files as
338 + attachments. This is for convenience as this is normally a Servlet Container set up but some containers
339 + do not have these defined by default. For docx/ppt/xlsx this means they will be recognized by IE as zip
340 + files. See http://littletechthoughts.blogspot.com/2009/01/ie-changes-docx-xlsx-pptx-to-zip-while.html
341 + for more details. -->
342 + <mime-mapping>
343 + <extension>doc</extension>
344 + <mime-type>application/msword</mime-type>
345 + </mime-mapping>
346 + <mime-mapping>
347 + <extension>xls</extension>
348 + <mime-type>application/vnd.ms-excel</mime-type>
349 + </mime-mapping>
350 + <mime-mapping>
351 + <extension>ppt</extension>
352 + <mime-type>application/vnd.ms-powerpoint</mime-type>
353 + </mime-mapping>
354 + <mime-mapping>
355 + <extension>docx</extension>
356 + <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
357 + </mime-mapping>
358 + <mime-mapping>
359 + <extension>xlsx</extension>
360 + <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
361 + </mime-mapping>
362 + <mime-mapping>
363 + <extension>pptx</extension>
364 + <mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type>
365 + </mime-mapping>
366 +
367 + <!-- Redirects to the Main.WebHome page if the user calls the root of the webapp, i.e.
368 + http://server:port/xwiki/
369 + Note 1: for this to work fine the redirect file needs to exist in the WAR
370 + Note 2: with Servlet 2.4 it's possible to have a Servlet directly specified in the welcome
371 + file list but right now we'd like XWiki to work out of the box with Servlet 2.3
372 + -->
373 + <welcome-file-list>
374 + <welcome-file>redirect</welcome-file>
375 + </welcome-file-list>
376 +
377 + <error-page>
378 + <error-code>404</error-code>
379 + <location>/bin/view/Main/DocumentDoesNotExist</location>
380 + </error-page>
381 +
382 + <!-- Uncomment if you wish to use a DataSource to define the Database connection
383 + <resource-ref>
384 + <description>DB Connection</description>
385 + <res-ref-name>jdbc/XWikiDS</res-ref-name>
386 + <res-type>javax.sql.DataSource</res-type>
387 + <res-auth>Container</res-auth>
388 + </resource-ref>
389 + -->
390 +
391 + <env-entry>
392 + <env-entry-name>XWikiConfig</env-entry-name>
393 + <env-entry-type>java.lang.String</env-entry-type>
394 + <env-entry-value>/WEB-INF/xwiki.cfg</env-entry-value>
395 + </env-entry>
396 +</web-app>
397 +

Get Connected