1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> |
---|
3 | <display-name>CLARIN Virtual Collection Registry</display-name> |
---|
4 | |
---|
5 | <!-- Spring --> |
---|
6 | |
---|
7 | <listener> |
---|
8 | <listener-class> |
---|
9 | org.springframework.web.context.ContextLoaderListener |
---|
10 | </listener-class> |
---|
11 | </listener> |
---|
12 | |
---|
13 | <context-param> |
---|
14 | <param-name>spring.profiles.active</param-name> |
---|
15 | <param-value>vcr.pid.dummy</param-value> |
---|
16 | <!--<param-value>vcr.pid.gwdg</param-value>--> |
---|
17 | </context-param> |
---|
18 | |
---|
19 | <!-- Persistence --> |
---|
20 | |
---|
21 | <filter> |
---|
22 | <filter-name>PersistenceFilter</filter-name> |
---|
23 | <filter-class>eu.clarin.cmdi.virtualcollectionregistry.rest.PersistenceFilter</filter-class> |
---|
24 | </filter> |
---|
25 | |
---|
26 | <filter-mapping> |
---|
27 | <filter-name>PersistenceFilter</filter-name> |
---|
28 | <servlet-name>REST-Web-Service</servlet-name> |
---|
29 | </filter-mapping> |
---|
30 | |
---|
31 | <filter-mapping> |
---|
32 | <filter-name>PersistenceFilter</filter-name> |
---|
33 | <url-pattern>/app/*</url-pattern> |
---|
34 | </filter-mapping> |
---|
35 | |
---|
36 | <filter> |
---|
37 | <filter-name>CharacterEncodingFilter</filter-name> |
---|
38 | <filter-class>eu.clarin.cmdi.virtualcollectionregistry.gui.CharacterEncodingFilter</filter-class> |
---|
39 | </filter> |
---|
40 | |
---|
41 | <filter-mapping> |
---|
42 | <filter-name>CharacterEncodingFilter</filter-name> |
---|
43 | <url-pattern>/app/*</url-pattern> |
---|
44 | </filter-mapping> |
---|
45 | |
---|
46 | <filter> |
---|
47 | <filter-name>VirtualCollectionRegistryApplication</filter-name> |
---|
48 | <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> |
---|
49 | <init-param> |
---|
50 | <param-name>applicationFactoryClassName</param-name> |
---|
51 | <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value> |
---|
52 | </init-param> |
---|
53 | <init-param> |
---|
54 | <param-name>configuration</param-name> |
---|
55 | <!-- |
---|
56 | <param-value>deployment</param-value> |
---|
57 | --> |
---|
58 | <param-value>development</param-value> |
---|
59 | </init-param> |
---|
60 | </filter> |
---|
61 | |
---|
62 | <filter-mapping> |
---|
63 | <filter-name>VirtualCollectionRegistryApplication</filter-name> |
---|
64 | <url-pattern>/app/*</url-pattern> |
---|
65 | </filter-mapping> |
---|
66 | |
---|
67 | <servlet> |
---|
68 | <display-name>Virtual Collection Registry REST web service</display-name> |
---|
69 | <servlet-name>REST-Web-Service</servlet-name> |
---|
70 | <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> |
---|
71 | <init-param> |
---|
72 | <param-name>com.sun.jersey.config.property.packages</param-name> |
---|
73 | <param-value>eu.clarin.cmdi.virtualcollectionregistry.rest</param-value> |
---|
74 | </init-param> |
---|
75 | <init-param> |
---|
76 | <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name> |
---|
77 | <param-value>eu.clarin.cmdi.virtualcollectionregistry.rest.VirtualCollectionMediaTypeFilter</param-value> |
---|
78 | </init-param> |
---|
79 | <load-on-startup>1</load-on-startup> |
---|
80 | </servlet> |
---|
81 | |
---|
82 | <servlet-mapping> |
---|
83 | <servlet-name>REST-Web-Service</servlet-name> |
---|
84 | <url-pattern>/service/*</url-pattern> |
---|
85 | </servlet-mapping> |
---|
86 | |
---|
87 | <servlet> |
---|
88 | <display-name>Virtual Collection Registry OAI-PMH Provider</display-name> |
---|
89 | <servlet-name>OAI-PMH-Provider</servlet-name> |
---|
90 | <servlet-class>eu.clarin.cmdi.oai.provider.ProviderServlet</servlet-class> |
---|
91 | <load-on-startup>2</load-on-startup> |
---|
92 | </servlet> |
---|
93 | |
---|
94 | <servlet-mapping> |
---|
95 | <servlet-name>OAI-PMH-Provider</servlet-name> |
---|
96 | <url-pattern>/oai</url-pattern> |
---|
97 | </servlet-mapping> |
---|
98 | |
---|
99 | <resource-ref> |
---|
100 | <description>Virtual Collection Datastore Connection</description> |
---|
101 | <res-ref-name>jdbc/VirtualCollectionStore</res-ref-name> |
---|
102 | <res-type>javax.sql.DataSource</res-type> |
---|
103 | <res-auth>Container</res-auth> |
---|
104 | </resource-ref> |
---|
105 | |
---|
106 | <!-- |
---|
107 | Security constraints; authentication mechanism must be configured |
---|
108 | by means of a security realm (by default the UserDatabaseRealm is |
---|
109 | configured in Tomcat, which uses the tomcat-users.xml file) |
---|
110 | --> |
---|
111 | <security-constraint> |
---|
112 | <display-name>REST-Web-Service</display-name> |
---|
113 | <web-resource-collection> |
---|
114 | <web-resource-name>REST-Web-Service</web-resource-name> |
---|
115 | <description></description> |
---|
116 | <url-pattern>/service/virtualcollections</url-pattern> |
---|
117 | <http-method>POST</http-method> |
---|
118 | </web-resource-collection> |
---|
119 | <web-resource-collection> |
---|
120 | <web-resource-name>REST-Web-Service</web-resource-name> |
---|
121 | <description></description> |
---|
122 | <url-pattern>/service/virtualcollections/*</url-pattern> |
---|
123 | <http-method>DELETE</http-method> |
---|
124 | <http-method>POST</http-method> |
---|
125 | <http-method>PUT</http-method> |
---|
126 | </web-resource-collection> |
---|
127 | <web-resource-collection> |
---|
128 | <web-resource-name>REST-Web-Service</web-resource-name> |
---|
129 | <description></description> |
---|
130 | <url-pattern>/service/my-virtualcollections</url-pattern> |
---|
131 | <http-method>GET</http-method> |
---|
132 | </web-resource-collection> |
---|
133 | <web-resource-collection> |
---|
134 | <web-resource-name>REST-Web-Service</web-resource-name> |
---|
135 | <description></description> |
---|
136 | <url-pattern>/service/submit</url-pattern> |
---|
137 | <http-method>POST</http-method> |
---|
138 | </web-resource-collection> |
---|
139 | <web-resource-collection> |
---|
140 | <web-resource-name>VirtualCollectionRegistryApplication</web-resource-name> |
---|
141 | <description></description> |
---|
142 | <url-pattern>/app/login</url-pattern> |
---|
143 | <http-method>GET</http-method> |
---|
144 | </web-resource-collection> |
---|
145 | <auth-constraint> |
---|
146 | <role-name>vcr</role-name> |
---|
147 | </auth-constraint> |
---|
148 | </security-constraint> |
---|
149 | |
---|
150 | <security-role> |
---|
151 | <role-name>vcr</role-name> |
---|
152 | </security-role> |
---|
153 | |
---|
154 | <login-config> |
---|
155 | <auth-method>BASIC</auth-method> |
---|
156 | </login-config> |
---|
157 | |
---|
158 | <security-role> |
---|
159 | <role-name>*</role-name> |
---|
160 | </security-role> |
---|
161 | |
---|
162 | <mime-mapping> |
---|
163 | <extension>xsd</extension> |
---|
164 | <mime-type>application/xml</mime-type> |
---|
165 | </mime-mapping> |
---|
166 | |
---|
167 | <welcome-file-list> |
---|
168 | <welcome-file>index.jsp</welcome-file> |
---|
169 | </welcome-file-list> |
---|
170 | |
---|
171 | <!-- |
---|
172 | Enable JavaMelody for application monitoring |
---|
173 | More info at https://code.google.com/p/javamelody/ |
---|
174 | --> |
---|
175 | |
---|
176 | <filter> |
---|
177 | <filter-name>monitoring</filter-name> |
---|
178 | <filter-class>net.bull.javamelody.MonitoringFilter</filter-class> |
---|
179 | </filter> |
---|
180 | <filter-mapping> |
---|
181 | <filter-name>monitoring</filter-name> |
---|
182 | <url-pattern>/*</url-pattern> |
---|
183 | </filter-mapping> |
---|
184 | <listener> |
---|
185 | <listener-class>net.bull.javamelody.SessionListener</listener-class> |
---|
186 | </listener> |
---|
187 | </web-app> |
---|