Alon Bar-Lev has uploaded a new change for review.
Change subject: root: use %{x} notation instead of ${x} in web.xml
......................................................................
root: use %{x} notation instead of ${x} in web.xml
rhel jboss, at least 7.1.3-4, perform unconditional properties ${x}
substitutions in web.xml, while fedora jboss at least 7.1.1-9.3, does
not.
a solution for rhel jboss is to use $${x}, while this solution is not
working for fedora jboss.
to allow common processing and future migration to other application
server the notation was changed to %{x}.
Related-Change-Id: I94f845d36bb075c238e50606187bc22316713cdd
Change-Id: I115118e6f46ac74bc882949e101bbe3d04e29684
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M
backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java
M
backend/manager/modules/root/src/main/java/org/ovirt/engine/core/pki/PKIResourceServlet.java
M backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
3 files changed, 12 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/47/14547/1
diff --git
a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java
b/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java
index 405417c..bb406e0 100644
---
a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java
+++
b/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/FileServlet.java
@@ -85,7 +85,8 @@
}
// Create the base file object:
- base = new File(EngineLocalConfig.getInstance().expandString(name));
+ // we use %{x} convention to avoid conflict with jboss properties
+ base = new
File(EngineLocalConfig.getInstance().expandString(name.replaceAll("%\\{",
"\\${")));
}
@Override
diff --git
a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/pki/PKIResourceServlet.java
b/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/pki/PKIResourceServlet.java
index df16ed3..e8fb1c8 100644
---
a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/pki/PKIResourceServlet.java
+++
b/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/pki/PKIResourceServlet.java
@@ -67,7 +67,8 @@
);
}
- this.resourceLocation =
EngineLocalConfig.getInstance().expandString(this.resourceLocation);
+ // we use %{x} convention to avoid conflict with jboss properties
+ this.resourceLocation =
EngineLocalConfig.getInstance().expandString(this.resourceLocation.replaceAll("%\\{",
"\\${"));
}
catch(Exception e) {
log.error("Cannot initialize", e);
diff --git a/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
b/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
index 11f4e7b..b259943 100644
--- a/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
+++ b/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
@@ -12,7 +12,7 @@
<servlet-class>org.ovirt.engine.core.pki.PKIResourceServlet</servlet-class>
<init-param>
<param-name>resource-location</param-name>
- <param-value>${ENGINE_PKI_CA}</param-value>
+ <param-value>%{ENGINE_PKI_CA}</param-value>
</init-param>
<init-param>
<param-name>output-format</param-name>
@@ -30,7 +30,7 @@
<servlet-class>org.ovirt.engine.core.pki.PKIResourceServlet</servlet-class>
<init-param>
<param-name>resource-location</param-name>
- <param-value>${ENGINE_PKI_ENGINE_CERT}</param-value>
+ <param-value>%{ENGINE_PKI_ENGINE_CERT}</param-value>
</init-param>
<init-param>
<param-name>output-alias</param-name>
@@ -63,7 +63,7 @@
<servlet-class>org.ovirt.engine.core.DocsServlet</servlet-class>
<init-param>
<param-name>file</param-name>
- <param-value>${ENGINE_DOC}/manual</param-value>
+ <param-value>%{ENGINE_DOC}/manual</param-value>
</init-param>
</servlet>
<servlet-mapping>
@@ -81,7 +81,7 @@
</init-param>
<init-param>
<param-name>file</param-name>
- <param-value>${SPICE_DIR}/SpiceX.cab</param-value>
+ <param-value>%{SPICE_DIR}/SpiceX.cab</param-value>
</init-param>
</servlet>
<servlet-mapping>
@@ -99,7 +99,7 @@
</init-param>
<init-param>
<param-name>file</param-name>
- <param-value>${SPICE_DIR}/SpiceVersion.txt</param-value>
+ <param-value>%{SPICE_DIR}/SpiceVersion.txt</param-value>
</init-param>
</servlet>
<servlet-mapping>
@@ -117,7 +117,7 @@
</init-param>
<init-param>
<param-name>file</param-name>
- <param-value>${SPICE_DIR}/SpiceX_x64.cab</param-value>
+ <param-value>%{SPICE_DIR}/SpiceX_x64.cab</param-value>
</init-param>
</servlet>
<servlet-mapping>
@@ -135,7 +135,7 @@
</init-param>
<init-param>
<param-name>file</param-name>
- <param-value>${SPICE_DIR}/SpiceVersion_x64.txt</param-value>
+ <param-value>%{SPICE_DIR}/SpiceVersion_x64.txt</param-value>
</init-param>
</servlet>
<servlet-mapping>
@@ -153,7 +153,7 @@
</init-param>
<init-param>
<param-name>file</param-name>
- <param-value>${ENGINE_ETC}/usbfilter.txt</param-value>
+ <param-value>%{ENGINE_ETC}/usbfilter.txt</param-value>
</init-param>
</servlet>
<servlet-mapping>
--
To view, visit http://gerrit.ovirt.org/14547
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I115118e6f46ac74bc882949e101bbe3d04e29684
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches