Update of /var/cvs/src/org/mmbase/module/core
In directory james.mmbase.org:/tmp/cvs-serv32653/src/org/mmbase/module/core

Modified Files:
        MMBase.java 
Log Message:
incorporate LOCALHOST keyword in host parameter


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/core


Index: MMBase.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/core/MMBase.java,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -b -r1.236 -r1.237
--- MMBase.java 11 Mar 2008 16:48:02 -0000      1.236
+++ MMBase.java 19 Mar 2008 11:43:30 -0000      1.237
@@ -44,7 +44,7 @@
  * @author Pierre van Rooden
  * @author Johannes Verelst
  * @author Ernst Bunders
- * @version $Id: MMBase.java,v 1.236 2008/03/11 16:48:02 michiel Exp $
+ * @version $Id: MMBase.java,v 1.237 2008/03/19 11:43:30 pierre Exp $
  */
 public class MMBase extends ProcessorModule {
 
@@ -330,14 +330,19 @@
 
         log.service("Localhost: " + localHost);
 
-        tmp = getInitParameter("HOST");
-        if (tmp != null && !tmp.equals("")) {
-            host = tmp;
+        String hostParam = getInitParameter("HOST");
+        if (hostParam != null && !hostParam.equals("")) {
+            // try to incorporate the localhost (if needed)
+            int pos = hostParam.indexOf("${LOCALHOST}");
+            if (pos != -1) {
+                hostParam =hostParam.substring(0, pos) +
+                    localHost + hostParam.substring(pos + 12);
+            }
+            host = hostParam;
         } else {
             host = localHost;
         }
 
-
         org.mmbase.util.XMLEntityResolver.clearMMEntities(false);
 
         String machineNameParam = getInitParameter("MACHINENAME");
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to