|
@@ -0,0 +1,119 @@
|
|
1
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+<!--
|
|
3
|
+ Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+ contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+ this work for additional information regarding copyright ownership.
|
|
6
|
+ The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+ (the "License"); you may not use this file except in compliance with
|
|
8
|
+ the License. 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
|
+ - This is the Cocoon web-app configurations file
|
|
21
|
+ -
|
|
22
|
+ - $Id$
|
|
23
|
+ -->
|
|
24
|
+<web-app version="2.4"
|
|
25
|
+ xmlns="http://java.sun.com/xml/ns/j2ee"
|
|
26
|
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
27
|
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
|
28
|
+
|
|
29
|
+ <!-- Servlet Filters ================================================ -->
|
|
30
|
+
|
|
31
|
+ <!--
|
|
32
|
+ - Declare a filter for multipart MIME handling
|
|
33
|
+ -->
|
|
34
|
+ <filter>
|
|
35
|
+ <description>Multipart MIME handling filter for Cocoon</description>
|
|
36
|
+ <display-name>Cocoon multipart filter</display-name>
|
|
37
|
+ <filter-name>CocoonMultipartFilter</filter-name>
|
|
38
|
+ <filter-class>org.apache.cocoon.servlet.multipart.MultipartFilter</filter-class>
|
|
39
|
+ </filter>
|
|
40
|
+
|
|
41
|
+ <!--
|
|
42
|
+ - Declare a filter for debugging incoming request
|
|
43
|
+ -->
|
|
44
|
+ <filter>
|
|
45
|
+ <description>Log debug information about each request</description>
|
|
46
|
+ <display-name>Cocoon debug filter</display-name>
|
|
47
|
+ <filter-name>CocoonDebugFilter</filter-name>
|
|
48
|
+ <filter-class>org.apache.cocoon.servlet.DebugFilter</filter-class>
|
|
49
|
+ </filter>
|
|
50
|
+
|
|
51
|
+ <!-- Filter mappings ================================================ -->
|
|
52
|
+
|
|
53
|
+ <!--
|
|
54
|
+ - Use the Cocoon multipart filter together with the Cocoon demo webapp
|
|
55
|
+ -->
|
|
56
|
+ <filter-mapping>
|
|
57
|
+ <filter-name>CocoonMultipartFilter</filter-name>
|
|
58
|
+ <servlet-name>Cocoon</servlet-name>
|
|
59
|
+ </filter-mapping>
|
|
60
|
+ <filter-mapping>
|
|
61
|
+ <filter-name>CocoonMultipartFilter</filter-name>
|
|
62
|
+ <servlet-name>DispatcherServlet</servlet-name>
|
|
63
|
+ </filter-mapping>
|
|
64
|
+
|
|
65
|
+ <!--
|
|
66
|
+ - Use the Cocoon debug filter together with the Cocoon demo webapp
|
|
67
|
+ <filter-mapping>
|
|
68
|
+ <filter-name>CocoonDebugFilter</filter-name>
|
|
69
|
+ <servlet-name>Cocoon</servlet-name>
|
|
70
|
+ </filter-mapping>
|
|
71
|
+ -->
|
|
72
|
+
|
|
73
|
+ <!-- Servlet Context Listener ======================================= -->
|
|
74
|
+
|
|
75
|
+ <!--
|
|
76
|
+ - Declare Spring context listener which sets up the Spring Application Context
|
|
77
|
+ - containing all Cocoon components (and user defined beans as well).
|
|
78
|
+ -->
|
|
79
|
+ <listener>
|
|
80
|
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
81
|
+ </listener>
|
|
82
|
+
|
|
83
|
+ <!--
|
|
84
|
+ - Declare Spring request listener which sets up the required RequestAttributes
|
|
85
|
+ - to support Springs and Cocoon custom bean scopes like the request scope or the
|
|
86
|
+ - session scope.
|
|
87
|
+ -->
|
|
88
|
+ <listener>
|
|
89
|
+ <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
|
|
90
|
+ </listener>
|
|
91
|
+
|
|
92
|
+ <!-- Servlet Configuration ========================================== -->
|
|
93
|
+
|
|
94
|
+ <!--
|
|
95
|
+ - Servlet that dispatches requests to the Spring managed block servlets
|
|
96
|
+ -->
|
|
97
|
+ <servlet>
|
|
98
|
+ <description>Cocoon blocks dispatcher</description>
|
|
99
|
+ <display-name>DispatcherServlet</display-name>
|
|
100
|
+ <servlet-name>DispatcherServlet</servlet-name>
|
|
101
|
+ <servlet-class>org.apache.cocoon.servletservice.DispatcherServlet</servlet-class>
|
|
102
|
+ <load-on-startup>1</load-on-startup>
|
|
103
|
+ </servlet>
|
|
104
|
+
|
|
105
|
+ <!-- URL space mappings ============================================= -->
|
|
106
|
+
|
|
107
|
+ <!--
|
|
108
|
+ - Cocoon handles all the URL space assigned to the webapp using its sitemap.
|
|
109
|
+ - It is recommended to leave it unchanged. Under some circumstances though
|
|
110
|
+ - (like integration with proprietary webapps or servlets) you might have
|
|
111
|
+ - to change this parameter.
|
|
112
|
+ -->
|
|
113
|
+ <servlet-mapping>
|
|
114
|
+ <servlet-name>DispatcherServlet</servlet-name>
|
|
115
|
+ <url-pattern>/*</url-pattern>
|
|
116
|
+ </servlet-mapping>
|
|
117
|
+
|
|
118
|
+</web-app>
|
|
119
|
+
|