- Timestamp:
- 2013-07-12T17:09:11+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/util/GlobalProperties.java
r25951 r27825 35 35 private static String properties_filename = "global.properties"; 36 36 private static String gsdl3_home = null; 37 private static String gsdl3_writablehome = null; 37 38 private static String gsdl3_web_address = null; 38 39 private static String full_gsdl3_web_address = null; … … 56 57 { 57 58 return gsdl3_home; 59 } 60 61 public static String getGSDL3WritableHome() 62 { 63 return gsdl3_writablehome; 58 64 } 59 65 … … 80 86 if (in != null) 81 87 { 82 logger.debug(" loading global properties");88 logger.debug("Loading global properties"); 83 89 properties.load(in); 84 90 in.close(); … … 86 92 else 87 93 { 88 logger.error(" couldn't load global properties!");94 logger.error("Couldn't load global properties: " + properties_filename); 89 95 } 90 96 91 97 gsdl3_home = properties.getProperty("gsdl3.home"); 92 if ((gsdl3_home == null || gsdl3_home.length() == 0) && optionalGS3Home != null && optionalGS3Home.length() > 0) 98 if ((gsdl3_home == null || gsdl3_home.length() == 0) 99 && optionalGS3Home != null && optionalGS3Home.length() > 0) 93 100 { 94 101 gsdl3_home = optionalGS3Home; … … 102 109 103 110 // make sure the path separators are correct 104 // gsdl3_home may be null, e gwhen we are loading properties from Server3111 // gsdl3_home may be null, e.g., when we are loading properties from Server3 105 112 if (gsdl3_home != null) 106 113 { … … 108 115 gsdl3_home = gs3_file.getPath(); 109 116 } 117 118 gsdl3_writablehome = properties.getProperty("gsdl3.writablehome"); 119 // if gsdl3_writablehome is null, then defaults to gsdl3_home 120 if (gsdl3_writablehome == null) { 121 gsdl3_writablehome = gsdl3_home; 122 } 123 110 124 //build the gsdl3 web address, in a way resilient to errors and ommisions in global.properties, simplifying where possible 111 125 //aiming for a string with no trailing slash, eg "http://localhost:8080/greenstone3" or "http://www.mygreenstonelibrary.com"
Note:
See TracChangeset
for help on using the changeset viewer.