Index: /greenstone3/trunk/src/java/org/greenstone/server/BaseServer.java
===================================================================
--- /greenstone3/trunk/src/java/org/greenstone/server/BaseServer.java	(revision 18672)
+++ /greenstone3/trunk/src/java/org/greenstone/server/BaseServer.java	(revision 18673)
@@ -4,15 +4,13 @@
 import java.awt.Dimension;
 import java.awt.Toolkit;
+import java.io.BufferedReader;
 import java.io.File;
-import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
 import java.util.Properties;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
 
 import org.apache.log4j.*;
 
 import org.greenstone.gsdl3.util.Dictionary;
-import org.greenstone.gsdl3.util.GlobalProperties;
 
 public abstract class BaseServer 
@@ -23,28 +21,29 @@
     static protected String STOP_CMD;
 
-    protected static final int SERVER_STARTED = 0;
-    protected static final int SERVER_START_FAILED = 1;
-    protected static final int BROWSER_LAUNCHED = 2;
-    protected static final int BROWSER_LAUNCH_FAILED = 3; 
-    
+    static protected final int SERVER_STARTED = 0;
+    static protected final int SERVER_START_FAILED = 1;
+    static protected final int BROWSER_LAUNCHED = 2;
+    static protected final int BROWSER_LAUNCH_FAILED = 3; 
+ 
+    static protected Properties build_properties;
+    static protected Logger logger_;
+
+    static public File build_properties_file;
+    static public Dictionary dictionary;
+    static public BaseProperty Property;
+
     protected int server_state_ = -1;    
-
     protected boolean configure_required_ = true;
-
-    public static File build_properties_file;
-    protected static Properties build_properties;
-    public static Dictionary dictionary;
-     
-    public static BaseProperty Property;
-
+    protected String gsdl_home;
     protected BaseServerControl server_control_;    
-
-    static protected Logger logger_;
-    
-    public BaseServer(String gsdl_home, String lang)
-    {
+    
+    protected BaseServer(String gsdl_home, String lang, String build_properties_path)
+    {
+	this.gsdl_home = gsdl_home;
+
+	// make sure we write to the correct logs
+	initLogger();
 	logger_ = Logger.getLogger(BaseServer.class.getName());
 
-	String build_properties_path=gsdl_home+File.separatorChar+"build.properties";
 	build_properties_file = new File(build_properties_path);
 
@@ -60,4 +59,7 @@
 
     }
+
+    // override to write to the correct logs
+    protected void initLogger() {}
 
     public void autoStart()
@@ -103,5 +105,5 @@
 	       recordError(CONFIGURE_CMD);
 	   }
-	   GlobalProperties.reload(); // properties file may have changed, so reload it
+	   reload();
 	   configure_required_ = false;
 	}
@@ -126,5 +128,5 @@
     
     protected void recordError(String message){
-        message = dictionary.get("ServerControl.Error",new String[]{message,GlobalProperties.getGSDL3Home()});
+        message = dictionary.get("ServerControl.Error",new String[]{message,gsdl_home});
 	server_control_.displayMessage(message);
 	logger_.error(dictionary.get("ServerControl.Failed",new String[]{message}));
@@ -133,5 +135,5 @@
 
     protected void recordError(String message, Exception e){
-        message = dictionary.get("ServerControl.Error",new String[]{message,GlobalProperties.getGSDL3Home()});
+        message = dictionary.get("ServerControl.Error",new String[]{message,gsdl_home});
 	server_control_.displayMessage(message);
 	logger_.error(dictionary.get("ServerControl.Failed",new String[]{message}),e);
@@ -145,4 +147,7 @@
 
    
+    public abstract String getBrowserURL();
+    public abstract void reload(); // reload properties, since they may have changed
+
     public void launchBrowser() {
         server_state_ = -1;
@@ -150,5 +155,6 @@
         String message = dictionary.get("ServerControl.LaunchingBrowser");
     	server_control_.displayMessage(message); 
-	String url = GlobalProperties.getGSDL3WebAddress()+ build_properties.getProperty(BaseServer.Property.DEFAULT_SERVLET);
+	String url = getBrowserURL();
+	//recordError("**** browserURL: " + url);
 	BrowserLauncher launcher = new BrowserLauncher(build_properties.getProperty(BaseServer.Property.BROWSER_PATH),url);
         logger_.info(message);
@@ -208,6 +214,7 @@
     public  void reloadBuildProperties() {
 	try {
-	    InputStream in = this.getClass().getClassLoader().getResourceAsStream("build.properties");
-	    
+	    //InputStream in = this.getClass().getClassLoader().getResourceAsStream("build.properties");
+	    FileInputStream in = new FileInputStream(build_properties_file);
+
 	    if (in != null) {
 		logger_.info("loading build properties");
