-
Notifications
You must be signed in to change notification settings - Fork 2
/
web.xml
362 lines (302 loc) · 11.9 KB
/
web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Dan Haywood
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the License.
-->
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>PublishMq Module Example App</display-name>
<welcome-file-list>
<welcome-file>about/index.html</welcome-file>
</welcome-file-list>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:activemq-config.xml,
classpath:camel-config.xml,
classpath:externalSystemFakeServer-config.xml,
classpath:propertyPlaceholderConfigurer-config.xml
</param-value>
</context-param>
<context-param>
<param-name>spring.config.file</param-name>
<param-value>classpath:spring.properties</param-value>
</context-param>
<servlet>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/soap/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>jolokia-agent</servlet-name>
<servlet-class>org.jolokia.http.AgentServlet</servlet-class>
<init-param>
<param-name>discoveryEnabled</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>agentDescription</param-name>
<param-value>Apache ActiveMQ</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jolokia-agent</servlet-name>
<!-- using same convention as standalone ActiveMQ -->
<url-pattern>/api/jolokia/*</url-pattern>
</servlet-mapping>
<!-- shiro security configuration -->
<listener>
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- which configuration directory to read overloaded property files from -->
<!--
Normally configuration like this should be done from outside your web
application. Especially if your configuration is not know in advance or
if it can change depending on where the application gets deployed.
For instance to configure this in Tomcat outside the application WAR add
the following line to your application context ( For more detail see:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Context_Parameters )
<Parameter name="isis.config.dir" value="/usr/local/tomcat/conf/"
override="true"/>
If your configuration directory is fixed you can enable the following
context parameter in here and forget about the outside part.
<context-param>
<param-name>isis.config.dir</param-name>
<param-value>location of your config directory if fixed</param-value>
</context-param>
-->
<!--
determines which additional configuration files to search for
-->
<context-param>
<param-name>isis.viewers</param-name>
<param-value>wicket,restfulobjects</param-value>
</context-param>
<!--
for diagnostics
-->
<filter>
<filter-name>IsisLogOnExceptionFilter</filter-name>
<filter-class>org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>IsisLogOnExceptionFilter</filter-name>
<url-pattern>/wicket/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>IsisLogOnExceptionFilter</filter-name>
<url-pattern>/restful/*</url-pattern>
</filter-mapping>
<!-- cache static resources for 1 day -->
<filter>
<filter-name>ResourceCachingFilter</filter-name>
<filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
<init-param>
<param-name>CacheTime</param-name>
<param-value>86400</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.css</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.png</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.jpg</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.gif</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceCachingFilter</filter-name>
<url-pattern>*.swf</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Resource</servlet-name>
<servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource</servlet-name>
<url-pattern>*.swf</url-pattern>
</servlet-mapping>
<!--
-
- config specific to the wicket-viewer
-
-->
<filter>
<filter-name>WicketFilter</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>org.isisaddons.module.publishmq.webapp.PublishMqModuleApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>WicketFilter</filter-name>
<url-pattern>/wicket/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>configuration</param-name>
<!--
<param-value>deployment</param-value>
-->
<param-value>development</param-value>
</context-param>
<!--
-
- config specific to the restfulobjects-viewer
-
-->
<!--
THE FOLLOWING CONFIGURATION IS NOT REQUIRED IF THE WICKET VIEWER IS IN USE.
IF THE WICKET VIEWER CONFIGURATION IS REMOVED, THEN UNCOMMENT
<listener>
<listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
</listener>
<context-param>
<param-name>deploymentType</param-name>
<param-value>SERVER_EXPLORATION</param-value>
</context-param>
<context-param>
<param-name>isis.viewers</param-name>
<param-value>restfulobjects</param-value>
</context-param>
-->
<!-- bootstrap the RestEasy framework -->
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<!-- used by RestEasy to determine the JAX-RS resources and other related configuration -->
<context-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.apache.isis.viewer.restfulobjects.server.RestfulObjectsApplication</param-value>
</context-param>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/restful/</param-value>
</context-param>
<!-- authenticate user, set up an Isis session -->
<filter>
<filter-name>IsisSessionFilterForRestfulObjects</filter-name>
<filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
<!-- authentication required for REST -->
<init-param>
<param-name>authenticationSessionStrategy</param-name>
<param-value>org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyBasicAuth</param-value>
</init-param>
<init-param>
<!-- what to do if no session was found; we indicate to issue a 401 basic authentication challenge -->
<param-name>whenNoSession</param-name>
<param-value>basicAuthChallenge</param-value>
</init-param>
</filter>
<filter-mapping>
<!-- this is mapped to the entire app; however the IsisSessionFilter will "notice" if the session filter has already been
executed for the request pipeline, and if so will do nothing -->
<filter-name>IsisSessionFilterForRestfulObjects</filter-name>
<servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
</filter-mapping>
<filter>
<filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
<filter-class>org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects</filter-class>
</filter>
<filter-mapping>
<filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
<servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
<url-pattern>/restful/*</url-pattern>
</servlet-mapping>
<!--
uncomment to use container-managed datasource;
for both container-managed (JTA) and non-container-managed transactions
-->
<!--
<resource-ref>
<description>db</description>
<res-ref-name>jdbc/quickstart</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-->
<!--
uncomment to use container-managed datasource
with container-managed transactions (JTA).
-->
<!--
<resource-ref>
<description>db</description>
<res-ref-name>jdbc/quickstart-nontx</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-->
</web-app>