Project

General

Profile

1
<!DOCTYPE web-app PUBLIC
2
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
3
 "http://java.sun.com/dtd/web-app_2_3.dtd" >
4
<web-app>
5
	<display-name>DNet-2.0 container web app</display-name>
6
	<context-param>
7
		<param-name>webAppRootKey</param-name>
8
		<param-value>claims-service</param-value>
9
	</context-param>
10
	<context-param>
11
		<param-name>contextConfigLocation</param-name>
12
		<param-value>/WEB-INF/applicationContext.xml</param-value>
13
	</context-param>
14
    <context-param>
15
        <param-name>log4jConfigLocation</param-name>
16
        <param-value>/WEB-INF/log4j.properties</param-value>
17
    </context-param>
18
    <listener>
19
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
20
    </listener>
21
	<listener>
22
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
23
	</listener>
24
	<listener>
25
		<listener-class>eu.dnetlib.data.emailSender.EmailScheduler</listener-class>
26
	</listener>
27

    
28

    
29

    
30
	<servlet>
31
		<servlet-name>jersey-serlvet</servlet-name>
32
		<!--<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>-->
33
		<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
34
		<init-param>
35
			<!--<param-name>com.sun.jersey.config.property.packages</param-name>-->
36
			<param-name>com.sun.jersey.config.property.packages</param-name>
37
			<param-value>eu.dnetlib.openaire.rest</param-value>
38
		</init-param>
39
		<load-on-startup>1</load-on-startup>
40
	</servlet>
41

    
42
	<servlet-mapping>
43
		<servlet-name>jersey-serlvet</servlet-name>
44
		<url-pattern>/rest/*</url-pattern>
45
	</servlet-mapping>
46

    
47
	<filter>
48
		<filter-name>CorsFilter</filter-name>
49
		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
50
		<init-param>
51
			<param-name>cors.allowed.origins</param-name>
52
			<param-value>*</param-value>
53
		</init-param>
54
		<init-param>
55
			<param-name>cors.allowed.methods</param-name>
56
			<param-value>GET,POST,HEAD,OPTIONS,DELETE</param-value>
57
		</init-param>
58
		<init-param>
59
			<param-name>cors.exposed.headers</param-name>
60
			<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials,Access-Control-Allow-Methods</param-value>
61
		</init-param>
62
		<init-param>
63
			<param-name>cors.support.credentials</param-name>
64
			<param-value>true</param-value>
65
		</init-param>
66
		<init-param>
67
			<param-name>cors.allowed.headers</param-name>
68
			<param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,X-XSRF-TOKEN,withcredentials</param-value>
69
		</init-param>
70
	</filter>
71
	<filter-mapping>
72
		<filter-name>CorsFilter</filter-name>
73
		<url-pattern>/*</url-pattern>
74
	</filter-mapping>
75

    
76
</web-app>
(4-4/4)