- Timestamp:
- 2007-08-06T20:24:00+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/greenstone3/ServletConfiguration.java
r14310 r14323 68 68 69 69 this.gsdl3_path = gsdl3_path; 70 70 71 if (Gatherer.isGsdlRemote){ 72 if (RemoteGreenstoneServer.downloadWebXMLFile().equals("")) { 73 System.err.println("Error: Could not download web.xml."); 74 System.exit(0); 75 } 76 } 71 77 //String web_xml_path = gsdl3_path + File.separator + "web" + File.separator + "WEB-INF"+ File.separator + "web.xml"; 72 78 File web_xml; … … 83 89 this.sites = new ArrayList(); 84 90 if (Gatherer.isGsdlRemote){ 85 if (RemoteGreenstoneServer.downloadWebXMLFile().equals("")) {86 System.err.println("Error: Could not download web.xml.");87 System.exit(0);88 }89 91 String sites_on_server = RemoteGreenstoneServer.getSiteNames(); 90 92 if (sites_on_server.equals("")) { … … 101 103 } 102 104 }else{ 103 // find the sites 104 File start = new File(Utility.getSitesDir(gsdl3_path)); 105 File possible_sites[] = start.listFiles(); 106 ArrayTools.sort(possible_sites); 107 for (int i=0; possible_sites != null && i < possible_sites.length; i++) { 108 File site_config = new File(possible_sites[i], "siteConfig.xml"); 109 if (site_config.exists()) { 110 this.sites.add(possible_sites[i].getName()); 105 // find the sites 106 File start = new File(Utility.getSitesDir(gsdl3_path)); 107 File possible_sites[] = start.listFiles(); 108 ArrayTools.sort(possible_sites); 109 for (int i=0; possible_sites != null && i < possible_sites.length; i++) { 110 File site_config = new File(possible_sites[i], "siteConfig.xml"); 111 if (site_config.exists()) { 112 this.sites.add(possible_sites[i].getName()); 113 } 111 114 } 112 115 } 113 } 116 114 117 this.mappings = new HashMap(); 115 118 Document web_config = XMLTools.parseXMLFile(web_xml.getAbsolutePath(), false);
Note:
See TracChangeset
for help on using the changeset viewer.