You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2013/10/14 17:34:52 UTC

[3/5] git commit: MARMOTTA-196: removed unnecesary configuration (now defined by annotations) in the webxml files of our launchers

MARMOTTA-196: removed unnecesary configuration (now defined by annotations) in the webxml files of our launchers


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/5ea9649d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/5ea9649d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/5ea9649d

Branch: refs/heads/develop
Commit: 5ea9649d968f2d6cf802e19edcf25ace89f5168f
Parents: bcccd8f
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 14 15:31:17 2013 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 14 15:31:17 2013 +0200

----------------------------------------------------------------------
 .../src/main/webapp/WEB-INF/web.xml             | 92 ++++----------------
 .../src/main/webapp/WEB-INF/web.xml             | 91 ++-----------------
 2 files changed, 25 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5ea9649d/launchers/marmotta-webapp-bigdata/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp-bigdata/src/main/webapp/WEB-INF/web.xml b/launchers/marmotta-webapp-bigdata/src/main/webapp/WEB-INF/web.xml
index 6531907..f4d8824 100644
--- a/launchers/marmotta-webapp-bigdata/src/main/webapp/WEB-INF/web.xml
+++ b/launchers/marmotta-webapp-bigdata/src/main/webapp/WEB-INF/web.xml
@@ -18,26 +18,16 @@
     limitations under the License.
 
 -->
-<web-app version="2.5"
+<web-app version="3.0"
          xmlns="http://java.sun.com/xml/ns/javaee"
          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">
-
-    <!-- enable custom JNDI implementation -->
-    <listener>
-        <listener-class>org.apache.marmotta.platform.core.jndi.MarmottaJndiListener</listener-class>
-    </listener>
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 
     <!-- enable CDI / Weld for dependency injection -->
     <listener>
        <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
     </listener>
 
-    <!-- Initialise the KiWi system -->
-    <listener>
-        <listener-class>org.apache.marmotta.platform.core.servlet.MarmottaPreStartupListener</listener-class>
-    </listener>
-
     <!-- RESTeasy Webservices -->
     <listener>
       <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
@@ -48,68 +38,42 @@
         <param-name>marmotta.home</param-name>
         <param-value>/tmp/marmotta</param-value>
     </context-param>
-
-    <!-- handle OPTIONS requests -->
-    <filter>
-        <filter-name>MarmottaOptionsFilter</filter-name>
-        <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaOptionsFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaOptionsFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- enables a cors filter and maps it to any request -->
+    
+    <!-- enables a CORS filter and maps it to any request -->
     <!-- for more fine grained configuration have a look at http://software.dzhuvinov.com/cors-filter-configuration.html -->
     <filter>
         <!-- The CORS filter with parameters -->
         <filter-name>CORS</filter-name>
         <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
-
         <init-param>
             <param-name>cors.supportedMethods</param-name>
             <param-value>GET, HEAD, POST, PUT, DELETE, OPTIONS</param-value>
         </init-param>
-
         <init-param>
             <param-name>cors.supportedHeaders</param-name>
             <param-value>Origin, Accept, Content-Type</param-value>
         </init-param>
-
     </filter>
     <filter-mapping>
         <filter-name>CORS</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
-
-    <!-- this filter performs startup configurations for first installation -->
-    <filter>
-        <filter-name>MarmottaPreStartupFilter</filter-name>
-        <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaPreStartupFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaPreStartupFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- Serve static resources from file system and from .jar files of the respective modules -->
-    <filter>
-        <filter-name>MarmottaResourceFilter</filter-name>
-        <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter</filter-class>
-        <init-param>
-            <!-- cache resources loaded from module jar files? -->
-            <param-name>kiwi.resourceCaching</param-name>
-            <param-value>true</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaResourceFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
+    
+	<servlet>
+		<servlet-name>H2Console</servlet-name>
+		<servlet-class>org.h2.server.web.WebServlet</servlet-class>
+		<init-param> <param-name>webAllowOthers</param-name> <param-value>true</param-value> </init-param>
+		<!--	<init-param> <param-name>trace</param-name> <param-value></param-value> </init-param> -->
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>H2Console</servlet-name>
+		<url-pattern>/database/*</url-pattern>
+	</servlet-mapping>
 
     <mime-mapping>
+    	 <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
         <extension>.xsl</extension>
-        <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
         <mime-type>application/xslt+xml</mime-type>
     </mime-mapping>
 
@@ -117,7 +81,6 @@
         <servlet-name>ViewStatusMessages</servlet-name>
         <servlet-class>ch.qos.logback.classic.ViewStatusMessagesServlet</servlet-class>
     </servlet>
-
     <servlet-mapping>
         <servlet-name>ViewStatusMessages</servlet-name>
         <url-pattern>/logging/status</url-pattern>
@@ -125,15 +88,12 @@
 
     <filter>
         <filter-name>MarmottaWebservices</filter-name>
-        <filter-class>
-            org.jboss.resteasy.plugins.server.servlet.FilterDispatcher
-        </filter-class>
+        <filter-class>org.jboss.resteasy.plugins.server.servlet.FilterDispatcher</filter-class>
         <init-param>
             <param-name>javax.ws.rs.Application</param-name>
             <param-value>org.apache.marmotta.platform.core.webservices.CoreApplication</param-value>
         </init-param>
     </filter>
-
     <filter-mapping>
         <filter-name>MarmottaWebservices</filter-name>
         <url-pattern>/*</url-pattern>
@@ -144,20 +104,4 @@
         <param-value>org.jboss.resteasy.cdi.CdiInjectorFactory</param-value>
     </context-param>
 
-   <!--<context-param>
-        <param-name>resteasy.providers</param-name>
-        <param-value>org.apache.marmotta.platform.core.filters.CorsInterceptor</param-value>
-    </context-param>-->
-
-    <filter>
-        <filter-name>MarmottaPostStartupFilter</filter-name>
-        <filter-class>
-            org.apache.marmotta.platform.core.servlet.MarmottaPostStartupFilter
-        </filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaPostStartupFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
 </web-app>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5ea9649d/launchers/marmotta-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/main/webapp/WEB-INF/web.xml b/launchers/marmotta-webapp/src/main/webapp/WEB-INF/web.xml
index fd0e8be..f4d8824 100644
--- a/launchers/marmotta-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/launchers/marmotta-webapp/src/main/webapp/WEB-INF/web.xml
@@ -18,26 +18,16 @@
     limitations under the License.
 
 -->
-<web-app version="2.5"
+<web-app version="3.0"
          xmlns="http://java.sun.com/xml/ns/javaee"
          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">
-
-    <!-- enable custom JNDI implementation -->
-    <listener>
-        <listener-class>org.apache.marmotta.platform.core.jndi.MarmottaJndiListener</listener-class>
-    </listener>
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 
     <!-- enable CDI / Weld for dependency injection -->
     <listener>
        <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
     </listener>
 
-    <!-- Initialise the KiWi system -->
-    <listener>
-        <listener-class>org.apache.marmotta.platform.core.servlet.MarmottaPreStartupListener</listener-class>
-    </listener>
-
     <!-- RESTeasy Webservices -->
     <listener>
       <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
@@ -48,74 +38,27 @@
         <param-name>marmotta.home</param-name>
         <param-value>/tmp/marmotta</param-value>
     </context-param>
-
-    <!-- handle OPTIONS requests -->
-    <filter>
-        <filter-name>MarmottaOptionsFilter</filter-name>
-        <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaOptionsFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaOptionsFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- enables a cors filter and maps it to any request -->
+    
+    <!-- enables a CORS filter and maps it to any request -->
     <!-- for more fine grained configuration have a look at http://software.dzhuvinov.com/cors-filter-configuration.html -->
     <filter>
         <!-- The CORS filter with parameters -->
         <filter-name>CORS</filter-name>
         <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
-
         <init-param>
             <param-name>cors.supportedMethods</param-name>
             <param-value>GET, HEAD, POST, PUT, DELETE, OPTIONS</param-value>
         </init-param>
-
         <init-param>
             <param-name>cors.supportedHeaders</param-name>
             <param-value>Origin, Accept, Content-Type</param-value>
         </init-param>
-
     </filter>
     <filter-mapping>
         <filter-name>CORS</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
-
-    <!-- this filter performs startup configurations for first installation -->
-    <filter>
-        <filter-name>MarmottaPreStartupFilter</filter-name>
-        <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaPreStartupFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaPreStartupFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- Serve static resources from file system and from .jar files of the respective modules -->
-    <filter>
-        <filter-name>MarmottaResourceFilter</filter-name>
-        <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter</filter-class>
-        <init-param>
-            <!-- cache resources loaded from module jar files? -->
-            <param-name>kiwi.resourceCaching</param-name>
-            <param-value>true</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaResourceFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <!-- H2 Configuration -->
-    <filter>
-      <filter-name>MarmottaH2ConsoleFilter</filter-name>
-      <filter-class>org.apache.marmotta.platform.core.servlet.MarmottaH2ConsoleFilter</filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaH2ConsoleFilter</filter-name>
-        <url-pattern>/database/*</url-pattern>
-    </filter-mapping>
+    
 	<servlet>
 		<servlet-name>H2Console</servlet-name>
 		<servlet-class>org.h2.server.web.WebServlet</servlet-class>
@@ -129,8 +72,8 @@
 	</servlet-mapping>
 
     <mime-mapping>
+    	 <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
         <extension>.xsl</extension>
-        <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
         <mime-type>application/xslt+xml</mime-type>
     </mime-mapping>
 
@@ -138,7 +81,6 @@
         <servlet-name>ViewStatusMessages</servlet-name>
         <servlet-class>ch.qos.logback.classic.ViewStatusMessagesServlet</servlet-class>
     </servlet>
-
     <servlet-mapping>
         <servlet-name>ViewStatusMessages</servlet-name>
         <url-pattern>/logging/status</url-pattern>
@@ -146,15 +88,12 @@
 
     <filter>
         <filter-name>MarmottaWebservices</filter-name>
-        <filter-class>
-            org.jboss.resteasy.plugins.server.servlet.FilterDispatcher
-        </filter-class>
+        <filter-class>org.jboss.resteasy.plugins.server.servlet.FilterDispatcher</filter-class>
         <init-param>
             <param-name>javax.ws.rs.Application</param-name>
             <param-value>org.apache.marmotta.platform.core.webservices.CoreApplication</param-value>
         </init-param>
     </filter>
-
     <filter-mapping>
         <filter-name>MarmottaWebservices</filter-name>
         <url-pattern>/*</url-pattern>
@@ -165,20 +104,4 @@
         <param-value>org.jboss.resteasy.cdi.CdiInjectorFactory</param-value>
     </context-param>
 
-   <!--<context-param>
-        <param-name>resteasy.providers</param-name>
-        <param-value>org.apache.marmotta.platform.core.filters.CorsInterceptor</param-value>
-    </context-param>-->
-
-    <filter>
-        <filter-name>MarmottaPostStartupFilter</filter-name>
-        <filter-class>
-            org.apache.marmotta.platform.core.servlet.MarmottaPostStartupFilter
-        </filter-class>
-    </filter>
-    <filter-mapping>
-        <filter-name>MarmottaPostStartupFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
 </web-app>