- Timestamp:
- 2022-03-13T11:37:42+13:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r36105 r36110 345 345 // up fedora further below, together with the local tomcat 346 346 } 347 347 348 348 // the no_load flag to GLI is processed at the end of handling open_collection_file_path 349 349 open_collection_file_path = open_collection; … … 352 352 "general.open_collection"+Configuration.gliPropertyNameSuffix(), true); 353 353 } 354 355 initCollectDirectoryPath();354 // we haven't worked out site name yet, so do this step later ... 355 //initCollectDirectoryPath(); 356 356 357 357 if (no_load || (isGsdlRemote && open_collection_file_path.equals(""))) { … … 359 359 } 360 360 361 361 362 362 // Before calling setProxy, store anything already present 363 363 // Downloading happens on the machine where GLI is running from, even with clientgli … … 525 525 526 526 if (Configuration.servlet_path == null || Configuration.servlet_path.equals("")) { 527 String my_servlet_path = null; 527 528 if (isGsdlRemote) { 528 529 System.err.println("servlet path is null, get new one from remote server"); 529 String my_servlet_path = remoteGreenstoneServer.getDefaultServletPath().trim(); 530 // set site name to match 531 String my_site_name = servlet_config.getSiteForServlet(my_servlet_path); 532 533 Configuration.setSiteAndServlet(my_site_name, my_servlet_path); 530 my_servlet_path = remoteGreenstoneServer.getDefaultServletPath().trim(); 534 531 } else { 535 // TODO - how do we work out default in local case? 536 Configuration.servlet_path = servlet_config.getServletPath(Configuration.site_name); 532 // we need to look up build.properties 533 System.err.println("servlet path is null, get one from build.properties"); 534 Properties build_props = loadBuildProperties(); 535 my_servlet_path = build_props.getProperty("greenstone.default.servlet", "/library"); 536 build_props = null; 537 537 } 538 } 539 } 540 538 // set site name to match 539 String my_site_name = servlet_config.getSiteForServlet(my_servlet_path); 540 System.err.println("setting site and servlet to " +my_site_name+", "+my_servlet_path); 541 Configuration.setSiteAndServlet(my_site_name, my_servlet_path); 542 543 } 544 } 545 546 initCollectDirectoryPath(); 541 547 // ensure that a directory called 'cache' exists in the GLI user directory 542 548 File user_cache_dir = new File(Gatherer.getGLIUserCacheDirectoryPath()); … … 1336 1342 } 1337 1343 1338 1344 static private Properties loadBuildProperties() { 1345 1346 File buildPropsFile = new File(Configuration.gsdl3_src_path + File.separator + "build.properties"); 1347 Properties props = null; 1348 if(buildPropsFile.exists()) { 1349 props = new Properties(); 1350 try{ 1351 props.load(new FileInputStream(buildPropsFile)); 1352 } catch (Exception e) { 1353 System.err.println("couldn't load properties "+e.toString()); 1354 props = null; 1355 } 1356 } 1357 return props; 1358 } 1339 1359 1340 1360 /** Prints a warning message about a missing library path, which means the final collection cannot be previewed in the Gatherer.
Note:
See TracChangeset
for help on using the changeset viewer.