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 2013/12/10 09:16:26 UTC
svn commit: r1549781 - in /ofbiz/branches/release13.07/framework:
common/src/org/ofbiz/common/email/NotificationServices.java
webapp/src/org/ofbiz/webapp/control/RequestHandler.java
webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java
Author: jleroux
Date: Tue Dec 10 08:16:26 2013
New Revision: 1549781
URL: http://svn.apache.org/r1549781
Log:
This completes r1549016
It's not pretty, but with Adrian's introduction of OfbizUrlBuilder class in trunk, this will be the only version with this scheme.
Modified:
ofbiz/branches/release13.07/framework/common/src/org/ofbiz/common/email/NotificationServices.java
ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java
Modified: ofbiz/branches/release13.07/framework/common/src/org/ofbiz/common/email/NotificationServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/src/org/ofbiz/common/email/NotificationServices.java?rev=1549781&r1=1549780&r2=1549781&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/common/src/org/ofbiz/common/email/NotificationServices.java (original)
+++ ofbiz/branches/release13.07/framework/common/src/org/ofbiz/common/email/NotificationServices.java Tue Dec 10 08:16:26 2013
@@ -29,6 +29,7 @@ import java.util.Map;
import javolution.util.FastMap;
+import org.ofbiz.base.container.ClassLoaderContainer;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilMisc;
@@ -309,6 +310,15 @@ public class NotificationServices {
enableHttps = (UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y")) ? Boolean.TRUE : Boolean.FALSE;
}
+ if (ClassLoaderContainer.portOffset != 0) {
+ Integer httpPortValue = Integer.valueOf(httpPort);
+ httpPortValue += ClassLoaderContainer.portOffset;
+ httpPort = httpPortValue.toString();
+ Integer httpsPortValue = Integer.valueOf(httpsPort);
+ httpsPortValue += ClassLoaderContainer.portOffset;
+ httpsPort = httpsPortValue.toString();
+ }
+
// prepare the (non-secure) URL
httpBase = new StringBuilder("http://");
httpBase.append(httpServer);
Modified: ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1549781&r1=1549780&r2=1549781&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Tue Dec 10 08:16:26 2013
@@ -1097,6 +1097,15 @@ public class RequestHandler {
enableHttps = UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y");
}
+ if (ClassLoaderContainer.portOffset != 0) {
+ Integer httpPortValue = Integer.valueOf(httpPort);
+ httpPortValue += ClassLoaderContainer.portOffset;
+ httpPort = httpPortValue.toString();
+ Integer httpsPortValue = Integer.valueOf(httpsPort);
+ httpsPortValue += ClassLoaderContainer.portOffset;
+ httpsPort = httpsPortValue.toString();
+ }
+
// create the path the the control servlet
String controlPath = (String) request.getAttribute("_CONTROL_PATH_");
Modified: ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java?rev=1549781&r1=1549780&r2=1549781&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java (original)
+++ ofbiz/branches/release13.07/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizUrlTransform.java Tue Dec 10 08:16:26 2013
@@ -32,6 +32,7 @@ import javax.xml.parsers.ParserConfigura
import org.ofbiz.base.component.ComponentConfig;
import org.ofbiz.base.component.ComponentConfig.WebappInfo;
+import org.ofbiz.base.container.ClassLoaderContainer;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilProperties;
@@ -75,6 +76,7 @@ public class OfbizUrlTransform implement
}
}
+ @Override
@SuppressWarnings("unchecked")
public Writer getWriter(final Writer out, Map args) {
final StringBuilder buf = new StringBuilder();
@@ -139,6 +141,16 @@ public class OfbizUrlTransform implement
if (enableHttps == null) {
enableHttps = UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y");
}
+
+ if (ClassLoaderContainer.portOffset != 0) {
+ Integer httpPortValue = Integer.valueOf(httpPort);
+ httpPortValue += ClassLoaderContainer.portOffset;
+ httpPort = httpPortValue.toString();
+ Integer httpsPortValue = Integer.valueOf(httpsPort);
+ httpsPortValue += ClassLoaderContainer.portOffset;
+ httpsPort = httpsPortValue.toString();
+ }
+
if (secure && enableHttps) {
String server = httpsServer;
if (UtilValidate.isEmpty(server)) {