Index: /gli/trunk/src/org/greenstone/gatherer/Gatherer.java
===================================================================
--- /gli/trunk/src/org/greenstone/gatherer/Gatherer.java	(revision 15396)
+++ /gli/trunk/src/org/greenstone/gatherer/Gatherer.java	(revision 15397)
@@ -904,127 +904,5 @@
 	dialog = null; // no more need of the dialog
 	
-	// Now we are connected. Need to tell fedora where to find the FedoraMETS
-	// files for ingestion
-
-	//Fedora needs an xml file: 
-	// FEDORA_HOME/tomcat/conf/Catalina/<fedora-hostname OR localhost>/gsdl.xml 
-	// (which is to be wherever fedora.xml is situated) in order to know where
-	// to get the collection contents from. 
-	writeGsdlXmlFile();
-
-    }
-
-    /** Fedora needs an xml file: 
-     *  FEDORA_HOME/tomcat/conf/Catalina/[fedora-hostname OR localhost]/gsdl.xml 
-     * (host folder is the one wherever fedora.xml is found) in order to know where
-     * to get the collection contents from.
-     * This method generates the necessary gsdl.xml file which points Fedora to the
-     * parent of the collect folder.
-    */
-    private static void writeGsdlXmlFile() {
-	// System.getenv(FEDORA_HOME) is deprecated in Java v4 (but is back in v5). 
-	// But fedora_info.getHome() will return FEDORA_HOME. 
-
-	// To do the following, we actually need to stop and restart the Fedora server. 
-	// Why should FLI have to do all this, or even know that it needs doing?
-	String execExtension = Utility.isWindows() ? "bat" : "sh";
-	String fedoraProcess = Configuration.fedora_info.getHome()+"tomcat"
-	    +File.separator+"bin"+File.separator;
-	String fedoraStop = fedoraProcess+"shutdown."+execExtension;
-	String fedoraStart = fedoraProcess+"startup."+execExtension;
-	String errorMessage = "";
-	
-	try{
-	    // (1) stop the fedora server
-	    errorMessage = "Failed to stop the fedora server.";
-
-	    Process process = Runtime.getRuntime().exec(fedoraStop);
-	    System.err.println("*****Stopping the fedora server: " + fedoraStop);
-	    int exitValue = -1;
-	    if((exitValue = process.waitFor()) != 0) {
-		throw new Exception(errorMessage);
-	    }
-	    System.out.println("Exit value is: " + exitValue);
-		
-	    // (2) See if the folder for the host contains fedora.xml, if it doesn't, 
-	    // then don't write gsdl.xml in there, try folder "localhost" instead
-	    String pathPrefix = Configuration.fedora_info.getHome()+"tomcat"+File.separator+"conf"
-		+File.separator+"Catalina";
-	    String gsdlHostFolderPath = pathPrefix+File.separator+Configuration.fedora_info.getHostname();
-	    File fedoraXML = new File(gsdlHostFolderPath,"fedora.xml");
-	    if(!fedoraXML.exists()) { 
-		// prepare the errorMessage just in case we need it
-		errorMessage = "Directory " + gsdlHostFolderPath + " is the wrong place to put"
-			+ " the crucial gsdl.xml file as it doesn't contain the example file fedora.xml\n";
-		    
-		// no default fedora.xml file in the folder we want to write gsdl.xml to
-		// so we may be in the wrong place
-		if(Configuration.fedora_info.getHostname().equals("localhost")) { 
-		    // if we just tried localhost and then failed
-		    // we can't continue
-		    fedoraXML = null;
-		    throw new Exception(errorMessage);		    
-		} else { 
-		    System.err.println("*** Folder " + gsdlHostFolderPath 
-			+"\nis the wrong location for gsdl.xml. Trying folder localhost.");
-		    // we just tried a folder of a different hostname, 
-		    // let's try "localhost" as a last ditch effort
-		    gsdlHostFolderPath = pathPrefix+File.separator+"localhost";
-		    fedoraXML = new File(gsdlHostFolderPath,"fedora.xml");
-		    if(!fedoraXML.exists()){
-			fedoraXML = null;
-			throw new Exception(errorMessage);
-		    } // else we found the location for gsdl.xml
-		}
-	    }
-
-	    // If we made it here, we found the correct folder to write gsdl.xml to
-	    errorMessage = "";
-	    fedoraXML = null;
-	    File gsdlXMLPath = new File(gsdlHostFolderPath);
-	    if(!gsdlXMLPath.exists()) {
-		// make sure all the intermediate directories exist 
-		// (should be the case when fedoraXML exists in it)
-		gsdlXMLPath.mkdirs();
-	    }
-	    String gsdlXMLFile = gsdlXMLPath+File.separator+"gsdl.xml";
-	    
-	    // (3) We write xml out containing the location of the parent folder of the collect dir
-	    String collectParent = Configuration.gsdl_path;
-	    if(Gatherer.GS3){ // Collect dir's parent folder is web/sites/localsite, which is GSDL3HOME/sites/localsite
-		collectParent = Configuration.gsdl3_path+"sites"+File.separator+"localsite";
-	    }
-	    System.err.println("****CollectParent folder: " + collectParent + "\n****gsdlXMLFile: " + gsdlXMLFile);
-	    
-	    // The contents we are going to write out to the file: <Context docBase="collectParent" path="/gsdl"></Context>
-	    // Does Fedora expect a / in the path to gsdl, does Fedora deal with "/gsdl" or do I need to use a File.separator?
-	    String contents = "<?xml version='1.0' encoding='utf-8'?>\n<Context docBase=\""
-		+collectParent+"\" path=\""+File.separator+"gsdl\"></Context>"; 
-	    
-	    // even if the file exists, we overwrite it, because we may have changed GS versions 
-	    // and collect dir would have changed though there'd still be a gsdl.xml file
-	    errorMessage =  "Failed to create the essential file: " + gsdlXMLFile;
-	    java.io.OutputStream gsdlXMLFileOut = new java.io.FileOutputStream(gsdlXMLFile);
-	    gsdlXMLFileOut.write(contents.getBytes());
-	    gsdlXMLFileOut.close();
-	    gsdlXMLFileOut = null;
-	    
-	    // Otherwise, restart the fedora server again
-	    errorMessage = "Failed to stop the fedora server.";
-	    process = Runtime.getRuntime().exec(fedoraStart);
-	    System.err.println("*****Restarting the fedora server: " + fedoraStart);
-	    if((exitValue = process.waitFor()) != 0) {
-		throw new Exception(errorMessage);
-	    }
-	    System.out.println("Exit value is: " + exitValue);
-	}catch(Exception e){
-	    System.err.println("****");
-	    System.err.println("* " + errorMessage + "\n" + e.getMessage());
-	    System.err.println("***");
-	    e.printStackTrace();
-	    DebugStream.printStackTrace(e);
-	    // We can't continue, so we exit
-	    System.exit(1);		
-	}	    
+	// Now we are connected.
     }
 
