summaryrefslogtreecommitdiffstats
path: root/winery/org.eclipse.winery.repository/src/main/webapp/WEB-INF/web.xml
diff options
context:
space:
mode:
Diffstat (limited to 'winery/org.eclipse.winery.repository/src/main/webapp/WEB-INF/web.xml')
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/WEB-INF/web.xml95
1 files changed, 95 insertions, 0 deletions
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/WEB-INF/web.xml b/winery/org.eclipse.winery.repository/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..b5eb167
--- /dev/null
+++ b/winery/org.eclipse.winery.repository/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*******************************************************************************
+ * Copyright (c) 2012-2013,2015 University of Stuttgart.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * Oliver Kopp - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="winery" version="3.0">
+ <display-name>Winery Repository</display-name>
+ <filter>
+ <filter-name>WineryResources</filter-name>
+ <filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
+ <init-param>
+ <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
+ <!-- RestDocFilter is required for RESTDoc. CORSFilter is required for the BPMN4TOSCA Plan Modeler -->
+ <param-value>org.eclipse.winery.repository.RestDocFilter;org.eclipse.winery.repository.CORSFilter</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.packages</param-name>
+ <param-value>org.eclipse.winery.repository.resources</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.CanonicalizeURIPath</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.NormalizeURI</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.Redirect</param-name>
+ <param-value>true</param-value>
+ </init-param>
+
+ <!-- enables @Consumes(MediaType.APPLICATION_JSON) and @Produces(MediaType.APPLICATION_JSON), see https://jersey.java.net/nonav/documentation/1.7/json.html -->
+ <init-param>
+ <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
+ <param-value>true</param-value>
+ </init-param>
+
+ </filter>
+ <filter-mapping>
+ <filter-name>WineryResources</filter-name>
+
+ <!--
+ Each resource handled by JAX-RS has to be written separately.
+ Reason:
+ * /components, /css, /images, /js are not provided by JAX-RS
+ * FilterForwardOn404 is a Jersey feature, not standardized
+ * It also forwards if a resource itself returns 404 (without an entity)
+ * The JAX-RS code should not be cluttered with Jersey specifics
+ -->
+
+ <!-- ordering as in TOSCA-v1.0.xsd of TOSCA CSD08 -->
+
+ <url-pattern>/imports/*</url-pattern>
+ <url-pattern>/servicetemplates/*</url-pattern>
+ <url-pattern>/nodetypes/*</url-pattern>
+ <url-pattern>/nodetypeimplementations/*</url-pattern>
+ <url-pattern>/relationshiptypes/*</url-pattern>
+ <url-pattern>/relationshiptypeimplementations/*</url-pattern>
+ <url-pattern>/requirementtypes/*</url-pattern>
+ <url-pattern>/capabilitytypes/*</url-pattern>
+ <url-pattern>/artifacttypes/*</url-pattern>
+ <url-pattern>/artifacttemplates/*</url-pattern>
+ <url-pattern>/policytypes/*</url-pattern>
+ <url-pattern>/policytemplates/*</url-pattern>
+
+ <!-- additional resources -->
+ <url-pattern>/</url-pattern>
+ <url-pattern>/admin/*</url-pattern>
+ <url-pattern>/API/*</url-pattern>
+ <url-pattern>/other/*</url-pattern>
+ <url-pattern>/test/*</url-pattern>
+
+ </filter-mapping>
+ <listener>
+ <listener-class>org.eclipse.winery.repository.Prefs</listener-class>
+ </listener>
+
+ <session-config>
+ <tracking-mode>COOKIE</tracking-mode>
+ </session-config>
+</web-app>