Changes for page Release Notes for XWiki 9.7-rc-1
Last modified by Marius Dumitru Florea on 2018/08/29
Change comment:
Uploaded new attachment "web-9.7RC1.xml", version 1.1
Summary
-
Attachments (0 modified, 2 added, 0 removed)
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 +
- 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 +