Changeset 32344 for main/trunk
- Timestamp:
- 2018-08-16T16:06:50+12:00 (6 years ago)
- Location:
- main/trunk/greenstone3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.xml
r32340 r32344 1431 1431 1432 1432 <antcall target="set-perl-shebangs" inheritAll="true" /> 1433 1433 1434 1434 <filter token="gsdlhome" value="${gs2build.home}"/> 1435 1435 <filter token="gsdlhomequoted" value=""${gs2build.home}""/> … … 1443 1443 <filter token="tomcat.server" value="${tomcat.server}"/> 1444 1444 <filter token="tomcat.port" value="${internal.tomcat.port}"/> 1445 <filter token="tomcat.port.http" value="${tomcat.port.http}"/> 1446 <filter token="tomcat.port.https" value="${tomcat.port.https}"/> 1445 <!-- add filters for tomcat.port.http and tomcat.port.https depending on if 1446 these are set. If any is not set, set its filter to the empty string --> 1447 <if> 1448 <bool><isset property="tomcat.port.http"/></bool> 1449 <filter token="tomcat.port.http" value="${tomcat.port.http}"/> 1450 <else><filter token="tomcat.port.http" value=""/></else> 1451 </if> 1452 <if> 1453 <bool><isset property="tomcat.port.https"/></bool> 1454 <filter token="tomcat.port.https" value="${tomcat.port.https}"/> 1455 <else><filter token="tomcat.port.https" value=""/></else> 1456 </if> 1447 1457 <filter token="greenstone.context" value="${greenstone.context}"/> 1448 1458 <filter token="derbyserver" value="${derby.server}"/> -
main/trunk/greenstone3/src/java/org/greenstone/util/GlobalProperties.java
r32336 r32344 40 40 private static String full_gsdl3_web_address = null; 41 41 42 private static String http_full_gsdl3_web_address = null; 43 private static String https_full_gsdl3_web_address = null; 44 42 45 /** get the value of the property 'key'. returns null if not found */ 43 46 public static String getProperty(String key) … … 207 210 full_gsdl3_web_address = protocolSpecifier + hostSpecifier + portSpecifier + contextSpecifier; 208 211 gsdl3_web_address = contextSpecifier; 212 213 // set the http and https variants of the full web address, if they're meant to be available 214 if(protocolSpecifier.startsWith("https")) { // check the default protocol, then set the address for the other protocol too 215 https_full_gsdl3_web_address = full_gsdl3_web_address; 216 217 // and set http version, if sufficient properties are available 218 String httpPort = properties.getProperty("tomcat.port.http"); 219 if(httpPort != null && !httpPort.equals("")) { 220 http_full_gsdl3_web_address = "http://" + hostSpecifier + httpPort + contextSpecifier; 221 } 222 } else { // default protocol was http 223 http_full_gsdl3_web_address = full_gsdl3_web_address; 224 225 // and set https version, if sufficient properties are available 226 String httpsPort = properties.getProperty("tomcat.port.https"); 227 if(httpsPort != null && !httpsPort.equals("")) { 228 https_full_gsdl3_web_address = "https://" + hostSpecifier + httpsPort + contextSpecifier; 229 } 230 } 209 231 } 210 232 catch (Exception e)
Note:
See TracChangeset
for help on using the changeset viewer.