ODE-1028: Integrated new ODE Web Console

Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/fad4da9f
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/fad4da9f
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/fad4da9f

Branch: refs/heads/master
Commit: fad4da9fa3fd69da561145cc097ccfc2cff3fbeb
Parents: 2328282
Author: sathwik <[email protected]>
Authored: Wed Jun 28 19:04:12 2017 +0530
Committer: sathwik <[email protected]>
Committed: Wed Jun 28 19:04:12 2017 +0530

----------------------------------------------------------------------
 Rakefile                                        | 21 ++---
 .../src/main/webapp/WEB-INF/urlrewrite.xml      | 41 +++++++++
 axis2-war/src/main/webapp/WEB-INF/web.xml       | 11 +++
 dependencies.rb                                 |  3 +
 tomee-server/src/main/webapp/WEB-INF/web.xml    | 88 ++++++++++++++++++++
 5 files changed, 148 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/fad4da9f/Rakefile
----------------------------------------------------------------------
diff --git a/Rakefile b/Rakefile
index a516fed..5e66bba 100644
--- a/Rakefile
+++ b/Rakefile
@@ -107,7 +107,7 @@ define "ode" do
       COMMONS.lang, COMMONS.pool, DERBY, DERBY_TOOLS, JACOB, JAXEN, 
JAVAX.activation, JAVAX.ejb, JAVAX.javamail,
       JAVAX.connector, JAVAX.jms, JAVAX.persistence, JAVAX.transaction, 
JAVAX.stream,  JIBX,
       GERONIMO.connector, GERONIMO.kernel, GERONIMO.transaction, LOG4J2, 
OPENJPA, SAXON, TRANQL,
-      WOODSTOX, WSDL4J, WS_COMMONS, XALAN, XERCES, XMLBEANS, SPRING, 
AXIS2_MODULES.libs, SLF4J, HAZELCAST
+      WOODSTOX, WSDL4J, WS_COMMONS, XALAN, XERCES, XMLBEANS, SPRING, 
AXIS2_MODULES.libs, SLF4J, HAZELCAST, ODE_WEB_CONSOLE, TUCKEY_URLREWRITE
 
     package(:war).with(:libs=>libs).path("WEB-INF").tap do |web_inf|
       web_inf.merge project("dao-jpa-ojpa-derby").package(:zip)
@@ -722,21 +722,10 @@ define "ode" do
         #remove conflicting artifacts from ODE war
         artifacts(rm_libs).each {|a| rm _(:target, 
"ode/WEB-INF/lib/"+Artifact.hash_to_file_name(a.to_hash)) }
 
-      # add resources to web.xml
-      resourcesxml  = Nokogiri::XML <<-eos
-        <resource-ref>
-            <res-ref-name>jdbc/ode</res-ref-name>
-            <res-type>javax.sql.DataSource</res-type>
-            <res-auth>Container</res-auth>
-            <res-sharing-scope>Shareable</res-sharing-scope>
-        </resource-ref>
-      eos
-
-      webxml = Nokogiri::XML(File.open(_(:target, "ode/WEB-INF/web.xml")))
-      webxml.xpath('//xmlns:web-app').first.add_child(resourcesxml.root)
-
-      File.open(_(:target, "ode/WEB-INF/web.xml"),'w') {|f| 
webxml.write_xml_to f}
-      # add TomcatFactory to ode-axis2.properties
+        #copy Servlet 3.0 enabled web.xml
+        cp path_to("src/main/webapp/WEB-INF/web.xml"), _(:target, 
"ode/WEB-INF/web.xml")
+
+       # add TomcatFactory to ode-axis2.properties
       File.open(_(:target, "ode/WEB-INF/conf/ode-axis2.properties"), 'a') do 
|file|
         file.puts 
"\node-axis2.tx.factory.class=org.apache.ode.axis2.util.TomcatFactory"
         file.puts "ode-axis2.db.mode=EXTERNAL"

http://git-wip-us.apache.org/repos/asf/ode/blob/fad4da9f/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml
----------------------------------------------------------------------
diff --git a/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml 
b/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml
new file mode 100644
index 0000000..f950be9
--- /dev/null
+++ b/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+
+<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN"
+        "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd";>
+
+<!--
+
+    Configuration file for UrlRewriteFilter
+    http://www.tuckey.org/urlrewrite/
+
+-->
+<urlrewrite>
+
+    <rule>
+        <note>
+            The rule means that requests to /ode will be redirected to 
+            /ode/webjars/ode-console/${version} the url will be rewritten.
+        </note>
+        <from>^/$</from>
+        <to type="redirect">webjars/ode-console/0.1.0-SNAPSHOT</to>
+    </rule>
+</urlrewrite>
+

http://git-wip-us.apache.org/repos/asf/ode/blob/fad4da9f/axis2-war/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/axis2-war/src/main/webapp/WEB-INF/web.xml 
b/axis2-war/src/main/webapp/WEB-INF/web.xml
index 36fc646..c182d1b 100644
--- a/axis2-war/src/main/webapp/WEB-INF/web.xml
+++ b/axis2-war/src/main/webapp/WEB-INF/web.xml
@@ -36,6 +36,17 @@
     </listener>
 
     <filter>
+        <filter-name>UrlRewriteFilter</filter-name>
+        
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>UrlRewriteFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
+
+    <filter>
         <filter-name>log4jServletFilter</filter-name>
         
<filter-class>org.apache.logging.log4j.web.Log4jServletFilter</filter-class>
     </filter>

http://git-wip-us.apache.org/repos/asf/ode/blob/fad4da9f/dependencies.rb
----------------------------------------------------------------------
diff --git a/dependencies.rb b/dependencies.rb
index ca7d408..7b75557 100644
--- a/dependencies.rb
+++ b/dependencies.rb
@@ -284,3 +284,6 @@ TOMEE = struct(
         :openjpa => 
["org.apache.openjpa:openjpa:jar:2.4.1","net.sourceforge.serp:serp:jar:1.15.1"]
 
 )
+
+ODE_WEB_CONSOLE     = "org.apache.ode:ode-console:jar:0.1.0-SNAPSHOT"
+TUCKEY_URLREWRITE   = "org.tuckey:urlrewritefilter:jar:4.0.4"

http://git-wip-us.apache.org/repos/asf/ode/blob/fad4da9f/tomee-server/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/tomee-server/src/main/webapp/WEB-INF/web.xml 
b/tomee-server/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..1cef6f7
--- /dev/null
+++ b/tomee-server/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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 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_3_0.xsd";>
+
+    <display-name>Apache-Axis2</display-name>
+
+    <filter>
+        <filter-name>UrlRewriteFilter</filter-name>
+        
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
+    <init-param>
+        <param-name>confReloadCheckInterval</param-name>
+        <param-value>10</param-value>
+    </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>UrlRewriteFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
+
+    <servlet>
+        <display-name>Apache-Axis Servlet</display-name>
+        <servlet-name>AxisServlet</servlet-name>
+        
<servlet-class>org.apache.ode.axis2.hooks.ODEAxisServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/servlet/AxisServlet</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>*.jws</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/processes/*</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/deployment/*</url-pattern>
+    </servlet-mapping>
+
+   <welcome-file-list>
+      <welcome-file>/index.html</welcome-file>
+    </welcome-file-list>
+
+    <error-page>
+      <error-code>404</error-code>
+      <location>/404.html</location>
+    </error-page>
+
+    <resource-ref>
+        <res-ref-name>jdbc/ode</res-ref-name>
+        <res-type>javax.sql.DataSource</res-type>
+        <res-auth>Container</res-auth>
+        <res-sharing-scope>Shareable</res-sharing-scope>
+    </resource-ref>
+</web-app>
\ No newline at end of file

Reply via email to