You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/12/18 12:52:19 UTC

[ofbiz-framework] branch release18.12 updated (8d978b2 -> b52bef9)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a change to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git.


    from 8d978b2  Fixed: Display file name in XML parsing errors (OFBIZ-6993)
     new e93d8a5  Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files (OFBIZ-6993)
     new b52bef9  Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../accounting/webapp/accounting/WEB-INF/web.xml   |  2 +-
 applications/accounting/webapp/ap/WEB-INF/web.xml  |  2 +-
 applications/accounting/webapp/ar/WEB-INF/web.xml  |  2 +-
 .../commonext/webapp/ofbizsetup/WEB-INF/web.xml    |  2 +-
 .../commonext/webapp/ordermgr-js/WEB-INF/web.xml   |  2 +-
 .../content/webapp/content/WEB-INF/web.xml         |  2 +-
 .../content/webapp/contentimages/WEB-INF/web.xml   |  2 +-
 .../humanres/webapp/humanres/WEB-INF/web.xml       |  2 +-
 .../webapp/manufacturing/WEB-INF/web.xml           |  2 +-
 .../marketing/webapp/marketing/WEB-INF/web.xml     |  2 +-
 applications/marketing/webapp/sfa/WEB-INF/web.xml  |  2 +-
 applications/order/webapp/ordermgr/WEB-INF/web.xml |  2 +-
 applications/party/webapp/partymgr/WEB-INF/web.xml |  2 +-
 .../product/webapp/catalog/WEB-INF/web.xml         |  2 +-
 .../product/webapp/facility/WEB-INF/web.xml        |  2 +-
 .../workeffort/webapp/ical/WEB-INF/web.xml         |  2 +-
 .../workeffort/webapp/workeffort/WEB-INF/web.xml   |  2 +-
 .../catalina/container/CatalinaContainer.java      | 24 +++++++---------------
 framework/resources/templates/web.xml              |  2 +-
 .../java/org/apache/ofbiz/webapp/WebAppUtil.java   |  5 +++++
 framework/webtools/webapp/webtools/WEB-INF/web.xml |  2 +-
 themes/bluelight/webapp/bluelight/WEB-INF/web.xml  |  2 +-
 themes/common-theme/webapp/common/WEB-INF/web.xml  |  2 +-
 themes/common-theme/webapp/images/WEB-INF/web.xml  |  2 +-
 themes/flatgrey/webapp/flatgrey/WEB-INF/web.xml    |  2 +-
 .../webapp/rainbowstone/WEB-INF/web.xml            |  2 +-
 themes/tomahawk/webapp/tomahawk/WEB-INF/web.xml    |  2 +-
 27 files changed, 37 insertions(+), 42 deletions(-)


[ofbiz-framework] 02/02: Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit b52bef9bbbb22d0e6e86787627ca75d1ea6fbc34
Author: Samuel Trégouët <sa...@nereide.fr>
AuthorDate: Wed Nov 27 14:30:41 2019 +0100

    Fixed: Add XML declaration in “web.xml” files
    (OFBIZ-6993)
    
    These declarations avoid SAXParseException traceback when parsing web.xml
    the first time in WebappUtil.parseWebXmlFile
---
 applications/accounting/webapp/accounting/WEB-INF/web.xml       | 2 +-
 applications/accounting/webapp/ap/WEB-INF/web.xml               | 2 +-
 applications/accounting/webapp/ar/WEB-INF/web.xml               | 2 +-
 applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml        | 2 +-
 applications/commonext/webapp/ordermgr-js/WEB-INF/web.xml       | 2 +-
 applications/content/webapp/content/WEB-INF/web.xml             | 2 +-
 applications/content/webapp/contentimages/WEB-INF/web.xml       | 2 +-
 applications/humanres/webapp/humanres/WEB-INF/web.xml           | 2 +-
 applications/manufacturing/webapp/manufacturing/WEB-INF/web.xml | 2 +-
 applications/marketing/webapp/marketing/WEB-INF/web.xml         | 2 +-
 applications/marketing/webapp/sfa/WEB-INF/web.xml               | 2 +-
 applications/order/webapp/ordermgr/WEB-INF/web.xml              | 2 +-
 applications/party/webapp/partymgr/WEB-INF/web.xml              | 2 +-
 applications/product/webapp/catalog/WEB-INF/web.xml             | 2 +-
 applications/product/webapp/facility/WEB-INF/web.xml            | 2 +-
 applications/workeffort/webapp/ical/WEB-INF/web.xml             | 2 +-
 applications/workeffort/webapp/workeffort/WEB-INF/web.xml       | 2 +-
 framework/resources/templates/web.xml                           | 2 +-
 framework/webtools/webapp/webtools/WEB-INF/web.xml              | 2 +-
 themes/bluelight/webapp/bluelight/WEB-INF/web.xml               | 2 +-
 themes/common-theme/webapp/common/WEB-INF/web.xml               | 2 +-
 themes/common-theme/webapp/images/WEB-INF/web.xml               | 2 +-
 themes/flatgrey/webapp/flatgrey/WEB-INF/web.xml                 | 2 +-
 themes/rainbowstone/webapp/rainbowstone/WEB-INF/web.xml         | 2 +-
 themes/tomahawk/webapp/tomahawk/WEB-INF/web.xml                 | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/applications/accounting/webapp/accounting/WEB-INF/web.xml b/applications/accounting/webapp/accounting/WEB-INF/web.xml
index b792337..958bf07 100644
--- a/applications/accounting/webapp/accounting/WEB-INF/web.xml
+++ b/applications/accounting/webapp/accounting/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Accounting Manager</display-name>
     <description>Accounting Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/accounting/webapp/ap/WEB-INF/web.xml b/applications/accounting/webapp/ap/WEB-INF/web.xml
index 0f12f57..83b385d 100644
--- a/applications/accounting/webapp/ap/WEB-INF/web.xml
+++ b/applications/accounting/webapp/ap/WEB-INF/web.xml
@@ -15,7 +15,7 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Account Payable</display-name>
     <description>Accounting Payable Module of the Apache OFBiz Project</description>
 
diff --git a/applications/accounting/webapp/ar/WEB-INF/web.xml b/applications/accounting/webapp/ar/WEB-INF/web.xml
index 23c89e6..c791dcf 100644
--- a/applications/accounting/webapp/ar/WEB-INF/web.xml
+++ b/applications/accounting/webapp/ar/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Account Receivable</display-name>
     <description>Accounting Receivable Module of the Apache OFBiz Project</description>
 
diff --git a/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml b/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml
index 9691cea..4a4a671 100644
--- a/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml
+++ b/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml
@@ -19,7 +19,7 @@
     under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Setup Manager</display-name>
     <description>Setup Manager Module of the Apache OFBiz Project</description>
     
diff --git a/applications/commonext/webapp/ordermgr-js/WEB-INF/web.xml b/applications/commonext/webapp/ordermgr-js/WEB-INF/web.xml
index 425ad2e..569bb6b 100644
--- a/applications/commonext/webapp/ordermgr-js/WEB-INF/web.xml
+++ b/applications/commonext/webapp/ordermgr-js/WEB-INF/web.xml
@@ -17,7 +17,7 @@
 -->
 
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Empty placeholder</display-name>
     <description>Empty placeholder, see http://svn.apache.org/viewvc?view=revision&amp;revision=1612202 </description>
 </web-app>
diff --git a/applications/content/webapp/content/WEB-INF/web.xml b/applications/content/webapp/content/WEB-INF/web.xml
index d271674..55c0ab7 100644
--- a/applications/content/webapp/content/WEB-INF/web.xml
+++ b/applications/content/webapp/content/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Content Manager</display-name>
     <description>Content Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/content/webapp/contentimages/WEB-INF/web.xml b/applications/content/webapp/contentimages/WEB-INF/web.xml
index 35196ca..6d5d1d3 100644
--- a/applications/content/webapp/contentimages/WEB-INF/web.xml
+++ b/applications/content/webapp/contentimages/WEB-INF/web.xml
@@ -17,7 +17,7 @@
 -->
 
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Content Empty placeholder</display-name>
     <description>Empty placeholder, see http://svn.apache.org/viewvc?view=revision&amp;revision=1658621 </description>
 </web-app>
diff --git a/applications/humanres/webapp/humanres/WEB-INF/web.xml b/applications/humanres/webapp/humanres/WEB-INF/web.xml
index d4d9e74..3bd35e7 100644
--- a/applications/humanres/webapp/humanres/WEB-INF/web.xml
+++ b/applications/humanres/webapp/humanres/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - HumanRes Manager</display-name>
     <description>HumanRes Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/web.xml b/applications/manufacturing/webapp/manufacturing/WEB-INF/web.xml
index 25e6f15..c34f385 100644
--- a/applications/manufacturing/webapp/manufacturing/WEB-INF/web.xml
+++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Manufacturing Manager</display-name>
     <description>Manufacturing Manager Module by TAU Informatica srl</description>
 
diff --git a/applications/marketing/webapp/marketing/WEB-INF/web.xml b/applications/marketing/webapp/marketing/WEB-INF/web.xml
index 3d171ff..485b446 100644
--- a/applications/marketing/webapp/marketing/WEB-INF/web.xml
+++ b/applications/marketing/webapp/marketing/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
   <display-name>Apache OFBiz - Marketing Manager</display-name>
   <description>Marketing Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/marketing/webapp/sfa/WEB-INF/web.xml b/applications/marketing/webapp/sfa/WEB-INF/web.xml
index 638e06a..af6880b 100644
--- a/applications/marketing/webapp/sfa/WEB-INF/web.xml
+++ b/applications/marketing/webapp/sfa/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - SFA Manager</display-name>
     <description>SFA Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/order/webapp/ordermgr/WEB-INF/web.xml b/applications/order/webapp/ordermgr/WEB-INF/web.xml
index 41265cc..26fc673 100644
--- a/applications/order/webapp/ordermgr/WEB-INF/web.xml
+++ b/applications/order/webapp/ordermgr/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Order Manager</display-name>
     <description>Order Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/party/webapp/partymgr/WEB-INF/web.xml b/applications/party/webapp/partymgr/WEB-INF/web.xml
index 483a9af..3d074ae 100644
--- a/applications/party/webapp/partymgr/WEB-INF/web.xml
+++ b/applications/party/webapp/partymgr/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
   <description>Party Manager Module of the Apache OFBiz Project</description>
   <display-name>Apache OFBiz - Party Manager</display-name>
 
diff --git a/applications/product/webapp/catalog/WEB-INF/web.xml b/applications/product/webapp/catalog/WEB-INF/web.xml
index a79e798..4125e88 100644
--- a/applications/product/webapp/catalog/WEB-INF/web.xml
+++ b/applications/product/webapp/catalog/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Catalog</display-name>
     <description>Catalog Module of the Apache OFBiz Project</description>
 
diff --git a/applications/product/webapp/facility/WEB-INF/web.xml b/applications/product/webapp/facility/WEB-INF/web.xml
index 0a3464f..ec7a0bc 100644
--- a/applications/product/webapp/facility/WEB-INF/web.xml
+++ b/applications/product/webapp/facility/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Facility Manager</display-name>
     <description>Facility Manager Module of the Apache OFBiz Project</description>
 
diff --git a/applications/workeffort/webapp/ical/WEB-INF/web.xml b/applications/workeffort/webapp/ical/WEB-INF/web.xml
index b890ca7..c795300 100644
--- a/applications/workeffort/webapp/ical/WEB-INF/web.xml
+++ b/applications/workeffort/webapp/ical/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - iCalendar Server</display-name>
     <description>iCalendar Server Module of the Apache OFBiz Project</description>
 
diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/web.xml b/applications/workeffort/webapp/workeffort/WEB-INF/web.xml
index c8aeb25..a403b05 100644
--- a/applications/workeffort/webapp/workeffort/WEB-INF/web.xml
+++ b/applications/workeffort/webapp/workeffort/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Work Manager</display-name>
     <description>Work Manager Module of the Apache OFBiz Project</description>
 
diff --git a/framework/resources/templates/web.xml b/framework/resources/templates/web.xml
index 2ca1b35..7009a1f 100644
--- a/framework/resources/templates/web.xml
+++ b/framework/resources/templates/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - @component-resource-name@ Component</display-name>
     <description>@component-resource-name@ Component of the Apache OFBiz Project</description>
 
diff --git a/framework/webtools/webapp/webtools/WEB-INF/web.xml b/framework/webtools/webapp/webtools/WEB-INF/web.xml
index 635897b..9604feb 100644
--- a/framework/webtools/webapp/webtools/WEB-INF/web.xml
+++ b/framework/webtools/webapp/webtools/WEB-INF/web.xml
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Web Tools</display-name>
     <description>Common Application Components of the Apache OFBiz Project</description>
 
diff --git a/themes/bluelight/webapp/bluelight/WEB-INF/web.xml b/themes/bluelight/webapp/bluelight/WEB-INF/web.xml
index cf99ec9..8e735a3 100644
--- a/themes/bluelight/webapp/bluelight/WEB-INF/web.xml
+++ b/themes/bluelight/webapp/bluelight/WEB-INF/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
   <display-name>Apache OFBiz - bluelight Visual Theme</display-name>
   <description>bluelight Visual Theme</description>
 
diff --git a/themes/common-theme/webapp/common/WEB-INF/web.xml b/themes/common-theme/webapp/common/WEB-INF/web.xml
index dd502c7..c04b8bf 100644
--- a/themes/common-theme/webapp/common/WEB-INF/web.xml
+++ b/themes/common-theme/webapp/common/WEB-INF/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
   <display-name>Apache OFBiz - Common Theme</display-name>
   <description>Common Theme</description>
 
diff --git a/themes/common-theme/webapp/images/WEB-INF/web.xml b/themes/common-theme/webapp/images/WEB-INF/web.xml
index 54c7c31..c5a676c 100644
--- a/themes/common-theme/webapp/images/WEB-INF/web.xml
+++ b/themes/common-theme/webapp/images/WEB-INF/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
   <display-name>Apache OFBiz - demostore images</display-name>
   <description>Demo Store Images for the Apache OFBiz Project</description>
 
diff --git a/themes/flatgrey/webapp/flatgrey/WEB-INF/web.xml b/themes/flatgrey/webapp/flatgrey/WEB-INF/web.xml
index 9aedae5..779f1c5 100644
--- a/themes/flatgrey/webapp/flatgrey/WEB-INF/web.xml
+++ b/themes/flatgrey/webapp/flatgrey/WEB-INF/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Apache OFBiz - Flat Grey Visual Theme</display-name>
     <description>Flat Grey Visual Theme</description>
     
diff --git a/themes/rainbowstone/webapp/rainbowstone/WEB-INF/web.xml b/themes/rainbowstone/webapp/rainbowstone/WEB-INF/web.xml
index 3aea413..fbd27e5 100644
--- a/themes/rainbowstone/webapp/rainbowstone/WEB-INF/web.xml
+++ b/themes/rainbowstone/webapp/rainbowstone/WEB-INF/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
     <display-name>Open For Business - Rainbowstone Visual Theme</display-name>
     <description>Rainbowstone Visual Theme</description>
     
diff --git a/themes/tomahawk/webapp/tomahawk/WEB-INF/web.xml b/themes/tomahawk/webapp/tomahawk/WEB-INF/web.xml
index 33cd723..c2c30a4 100644
--- a/themes/tomahawk/webapp/tomahawk/WEB-INF/web.xml
+++ b/themes/tomahawk/webapp/tomahawk/WEB-INF/web.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<web-app version="3.0">
+<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
   <display-name>Apache OFBiz - Tomahawk Visual Theme</display-name>
   <description>Tomahawk Visual Theme</description>
 


[ofbiz-framework] 01/02: Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files (OFBIZ-6993)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit e93d8a55607810ab6ab5d1d2e7574a769ceb941a
Author: Samuel Trégouët <sa...@nereide.fr>
AuthorDate: Thu Nov 28 13:48:55 2019 +0100

    Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files
    (OFBIZ-6993)
    
    # Conflict handled by hand in:
    #	framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
---
 .../catalina/container/CatalinaContainer.java      | 24 +++++++---------------
 .../java/org/apache/ofbiz/webapp/WebAppUtil.java   |  5 +++++
 2 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
index d6deca0..aa1115f 100644
--- a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
+++ b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
@@ -20,7 +20,6 @@ package org.apache.ofbiz.catalina.container;
 
 import java.io.File;
 import java.io.IOException;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -34,7 +33,6 @@ import java.util.stream.Collectors;
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import javax.xml.parsers.ParserConfigurationException;
 
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
@@ -70,19 +68,17 @@ import org.apache.ofbiz.base.container.ContainerConfig;
 import org.apache.ofbiz.base.container.ContainerConfig.Configuration;
 import org.apache.ofbiz.base.container.ContainerConfig.Configuration.Property;
 import org.apache.ofbiz.base.container.ContainerException;
-import org.apache.ofbiz.base.location.FlexibleLocation;
 import org.apache.ofbiz.base.start.Start;
 import org.apache.ofbiz.base.start.StartupCommand;
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilValidate;
-import org.apache.ofbiz.base.util.UtilXml;
 import org.apache.ofbiz.entity.util.EntityUtilProperties;
+import org.apache.ofbiz.webapp.WebAppUtil;
 import org.apache.tomcat.JarScanner;
 import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.descriptor.web.FilterDef;
 import org.apache.tomcat.util.descriptor.web.FilterMap;
 import org.apache.tomcat.util.scan.StandardJarScanner;
-import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
 /**
@@ -500,7 +496,7 @@ public class CatalinaContainer implements Container {
         Tomcat.initWebappDefaults(context);
 
         String location = getWebappRootLocation(appInfo);
-        boolean contextIsDistributable = isContextDistributable(configuration, location);
+        boolean contextIsDistributable = isContextDistributable(configuration, appInfo);
 
         context.setParent(host);
         context.setDocBase(location);
@@ -570,19 +566,13 @@ public class CatalinaContainer implements Container {
         return mount;
     }
 
-    private boolean isContextDistributable(ContainerConfig.Configuration configuration, String location) throws ContainerException {
-        String webXmlFilePath = new StringBuilder().append("file:///").append(location).append("/WEB-INF/web.xml").toString();
+    private static boolean isContextDistributable(ContainerConfig.Configuration configuration,
+            ComponentConfig.WebappInfo appInfo) throws ContainerException {
         boolean appIsDistributable = ContainerConfig.getPropertyValue(configuration, "apps-distributable", true);
         try {
-            URL webXmlUrl = FlexibleLocation.resolveLocation(webXmlFilePath);
-            File webXmlFile = new File(webXmlUrl.getFile());
-            if (webXmlFile.exists()) {
-                Document webXmlDoc = UtilXml.readXmlDocument(webXmlUrl);
-                return appIsDistributable && webXmlDoc.getElementsByTagName("distributable").getLength() > 0;
-            }
-            Debug.logInfo(webXmlFilePath + " not found.", module);
-            return appIsDistributable;
-        } catch (SAXException | ParserConfigurationException | IOException e) {
+            boolean isDistributable = WebAppUtil.isDistributable(appInfo);
+            return appIsDistributable && isDistributable;
+        } catch (SAXException | IOException e) {
             throw new ContainerException(e);
         }
     }
diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
index ccd146b..c8edb15 100644
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
@@ -101,6 +101,11 @@ public final class WebAppUtil {
         return servletPath;
     }
 
+    public static boolean isDistributable(WebappInfo appinfo) throws IOException, SAXException {
+        WebXml webxml = getWebXml(appinfo);
+        return webxml.isDistributable();
+    }
+
     /**
      * Returns the <code>WebappInfo</code> instance associated to the specified web site ID.
      * Throws <code>IllegalArgumentException</code> if the web site ID was not found.