Last modified by Marius Dumitru Florea on 2018/08/29

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

Summary

Details

web-9.6.xml
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.mflorea
Size
... ... @@ -1,0 +1,1 @@
1 +16.5 KB
Content
... ... @@ -1,0 +1,428 @@
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.server.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.server.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.server.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 + <filter-mapping>
182 + <filter-name>XWikiContextInitializationFilter</filter-name>
183 + <servlet-name>gwtrpc</servlet-name>
184 + <dispatcher>REQUEST</dispatcher>
185 + <dispatcher>INCLUDE</dispatcher>
186 + <dispatcher>FORWARD</dispatcher>
187 + </filter-mapping>
188 +
189 + <!-- TODO: This should be fixed. It's not normal that the REST module depends on the WYSIWYG module.
190 + "XWikiXmlRpcContextInitializationFilter" points to
191 + org.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter -->
192 + <filter-mapping>
193 + <filter-name>XWikiXmlRpcContextInitializationFilter</filter-name>
194 + <servlet-name>RestletServlet</servlet-name>
195 + <dispatcher>REQUEST</dispatcher>
196 + <dispatcher>INCLUDE</dispatcher>
197 + <dispatcher>FORWARD</dispatcher>
198 + </filter-mapping>
199 +
200 + <filter-mapping>
201 + <filter-name>Set Content-Script-Type</filter-name>
202 + <url-pattern>/*</url-pattern>
203 + </filter-mapping>
204 +
205 + <!-- We set the CORS policy globally for webjars.
206 +
207 + TODO: We currently use a <servlet-name> mapping since we've noticed that <url-pattern> ones have no effect.
208 + The problem is described at http://stackoverflow.com/questions/31142302/getnameddispatcher-forward-and-filters-using-url-pattern
209 + Right now it means that all URLs handled by a ResourceReferenecHandler<ResourceType> will have this filter
210 + applied when it should only be applied to "webjars" URLs. We need to find a solution to fix this. It happens
211 + that at this point in time, only "webjars" URLs are handled using a ResourceReferenecHandler<ResourceType>.
212 + -->
213 + <filter-mapping>
214 + <filter-name>Set CORS policy for fonts</filter-name>
215 + <servlet-name>resourceReferenceHandler</servlet-name>
216 + <url-pattern>/webjars/*</url-pattern>
217 + <url-pattern>*.woff</url-pattern>
218 + <url-pattern>*.eot</url-pattern>
219 + <url-pattern>*.ttf</url-pattern>
220 + <dispatcher>REQUEST</dispatcher>
221 + <dispatcher>FORWARD</dispatcher>
222 + </filter-mapping>
223 +
224 + <!-- Initializes XWiki -->
225 + <listener>
226 + <listener-class>org.xwiki.container.servlet.XWikiServletContextListener</listener-class>
227 + </listener>
228 +
229 + <listener>
230 + <listener-class>org.xwiki.container.servlet.SetThreadNameServletRequestListener</listener-class>
231 + </listener>
232 +
233 + <!-- Handles Resource Types registered as Components (e.g. WebJars) -->
234 + <servlet>
235 + <servlet-name>resourceReferenceHandler</servlet-name>
236 + <servlet-class>org.xwiki.resource.servlet.ResourceReferenceHandlerServlet</servlet-class>
237 + </servlet>
238 +
239 + <servlet>
240 + <servlet-name>action</servlet-name>
241 + <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
242 + <init-param>
243 + <param-name>application</param-name>
244 + <param-value>ApplicationResources</param-value>
245 + </init-param>
246 + <init-param>
247 + <param-name>xwiki</param-name>
248 + <param-value>com.xpn.xwiki.XWiki</param-value>
249 + </init-param>
250 + <init-param>
251 + <param-name>config</param-name>
252 + <param-value>/WEB-INF/struts-config.xml</param-value>
253 + </init-param>
254 + <init-param>
255 + <param-name>debug</param-name>
256 + <param-value>2</param-value>
257 + </init-param>
258 + <init-param>
259 + <param-name>detail</param-name>
260 + <param-value>2</param-value>
261 + </init-param>
262 + <init-param>
263 + <param-name>validate</param-name>
264 + <param-value>true</param-value>
265 + </init-param>
266 + <load-on-startup>2</load-on-startup>
267 + </servlet>
268 +
269 + <servlet>
270 + <servlet-name>redirectHomeServlet</servlet-name>
271 + <servlet-class>com.xpn.xwiki.web.HomePageRedirectServlet</servlet-class>
272 + <!-- Uncomment and edit this if you want to redirect to a different home page, or if you have different mappings.
273 + Note: the URL should not start with /, because it allows the context name to be changed. If it starts with /,
274 + then it should be an absolute URL, including the application context path.
275 + <init-param>
276 + <description>The address to redirect to when the client hits the root of the application.</description>
277 + <param-name>homePage</param-name>
278 + <param-value>bin/Main/</param-value>
279 + </init-param>
280 + -->
281 + </servlet>
282 +
283 + <!-- This is the entry point for all component-based XWiki GWT services. XWikiService servlet should be dropped
284 + in favor of this servlet when we completely move to components. -->
285 + <servlet>
286 + <servlet-name>gwtrpc</servlet-name>
287 + <servlet-class>org.xwiki.wysiwyg.server.XWikiRemoteServiceServlet</servlet-class>
288 + </servlet>
289 +
290 + <!-- This is the entry pointy for XWiki GWT services -->
291 + <servlet>
292 + <servlet-name>XWikiService</servlet-name>
293 + <servlet-class>com.xpn.xwiki.gwt.api.server.XWikiServiceImpl</servlet-class>
294 + </servlet>
295 +
296 + <!-- RESTful API Restlet servlet -->
297 + <servlet>
298 + <servlet-name>RestletServlet</servlet-name>
299 + <servlet-class>
300 + org.xwiki.rest.internal.XWikiRestletServlet
301 + </servlet-class>
302 + </servlet>
303 +
304 + <!-- RESTful API mapping -->
305 + <servlet-mapping>
306 + <servlet-name>RestletServlet</servlet-name>
307 + <url-pattern>/rest/*</url-pattern>
308 + </servlet-mapping>
309 +
310 + <servlet-mapping>
311 + <servlet-name>action</servlet-name>
312 + <url-pattern>/bin/*</url-pattern>
313 + </servlet-mapping>
314 +
315 + <servlet-mapping>
316 + <servlet-name>action</servlet-name>
317 + <url-pattern>/wiki/*</url-pattern>
318 + </servlet-mapping>
319 +
320 + <servlet-mapping>
321 + <servlet-name>action</servlet-name>
322 + <url-pattern>/testbin/*</url-pattern>
323 + </servlet-mapping>
324 +
325 + <servlet-mapping>
326 + <servlet-name>action</servlet-name>
327 + <url-pattern>/xwiki/*</url-pattern>
328 + </servlet-mapping>
329 +
330 + <servlet-mapping>
331 + <servlet-name>redirectHomeServlet</servlet-name>
332 + <url-pattern>/redirect</url-pattern>
333 + </servlet-mapping>
334 +
335 + <servlet-mapping>
336 + <servlet-name>gwtrpc</servlet-name>
337 + <url-pattern>*.gwtrpc</url-pattern>
338 + </servlet-mapping>
339 +
340 + <servlet-mapping>
341 + <servlet-name>XWikiService</servlet-name>
342 + <url-pattern>/XWikiService</url-pattern>
343 + </servlet-mapping>
344 +
345 + <!-- We override the mime type definition for javascript and css files, as some containers don't
346 + provide it, causing problems for javascript files containg velocity code, like
347 + fullscreen.js -->
348 + <mime-mapping>
349 + <extension>js</extension>
350 + <mime-type>text/javascript</mime-type>
351 + </mime-mapping>
352 + <mime-mapping>
353 + <extension>css</extension>
354 + <mime-type>text/css</mime-type>
355 + </mime-mapping>
356 +
357 + <!-- In order to properly work, HTML Components MUST have the proper MIME type starting with XP SP2 -->
358 + <mime-mapping>
359 + <extension>htc</extension>
360 + <mime-type>text/x-component</mime-type>
361 + </mime-mapping>
362 +
363 + <mime-mapping>
364 + <extension>bmp</extension>
365 + <mime-type>image/bmp</mime-type>
366 + </mime-mapping>
367 +
368 + <!-- MS Office mime mappings. We add these to provide out-of-the-box support for downloading Office files as
369 + attachments. This is for convenience as this is normally a Servlet Container set up but some containers
370 + do not have these defined by default. For docx/ppt/xlsx this means they will be recognized by IE as zip
371 + files. See http://littletechthoughts.blogspot.com/2009/01/ie-changes-docx-xlsx-pptx-to-zip-while.html
372 + for more details. -->
373 + <mime-mapping>
374 + <extension>doc</extension>
375 + <mime-type>application/msword</mime-type>
376 + </mime-mapping>
377 + <mime-mapping>
378 + <extension>xls</extension>
379 + <mime-type>application/vnd.ms-excel</mime-type>
380 + </mime-mapping>
381 + <mime-mapping>
382 + <extension>ppt</extension>
383 + <mime-type>application/vnd.ms-powerpoint</mime-type>
384 + </mime-mapping>
385 + <mime-mapping>
386 + <extension>docx</extension>
387 + <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
388 + </mime-mapping>
389 + <mime-mapping>
390 + <extension>xlsx</extension>
391 + <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
392 + </mime-mapping>
393 + <mime-mapping>
394 + <extension>pptx</extension>
395 + <mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type>
396 + </mime-mapping>
397 +
398 + <!-- Redirects to the Main.WebHome page if the user calls the root of the webapp, i.e.
399 + http://server:port/xwiki/
400 + Note 1: for this to work fine the redirect file needs to exist in the WAR
401 + Note 2: with Servlet 2.4 it's possible to have a Servlet directly specified in the welcome
402 + file list but right now we'd like XWiki to work out of the box with Servlet 2.3
403 + -->
404 + <welcome-file-list>
405 + <welcome-file>redirect</welcome-file>
406 + </welcome-file-list>
407 +
408 + <error-page>
409 + <error-code>404</error-code>
410 + <location>/bin/view/Main/DocumentDoesNotExist</location>
411 + </error-page>
412 +
413 + <!-- Uncomment if you wish to use a DataSource to define the Database connection
414 + <resource-ref>
415 + <description>DB Connection</description>
416 + <res-ref-name>jdbc/XWikiDS</res-ref-name>
417 + <res-type>javax.sql.DataSource</res-type>
418 + <res-auth>Container</res-auth>
419 + </resource-ref>
420 + -->
421 +
422 + <env-entry>
423 + <env-entry-name>XWikiConfig</env-entry-name>
424 + <env-entry-type>java.lang.String</env-entry-type>
425 + <env-entry-value>/WEB-INF/xwiki.cfg</env-entry-value>
426 + </env-entry>
427 +</web-app>
428 +

Get Connected