Changeset 32357 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/ServletRealmCheck.java
- Timestamp:
- 2018-08-22T22:08:05+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/ServletRealmCheck.java
r28959 r32357 29 29 import java.net.URLConnection; 30 30 import java.util.Properties; 31 32 import org.greenstone.util.ProtocolPortProperties; 31 33 32 34 /** … … 86 88 // get the property value and print it out 87 89 String servername = buildProps.getProperty("tomcat.server"); 88 String port = buildProps.getProperty("tomcat.port"); 90 //String protocol = buildProps.getProperty("server.protocol", "http"); 91 //String port = buildProps.getProperty("tomcat.port"+protocol, "8383"); 92 93 ProtocolPortProperties protocolPortProps = new ProtocolPortProperties(buildProps); 94 if(protocolPortProps.hadError()) { 95 throw new Exception("**** ERROR with port and/or protocol in build.properties:\n" + protocolPortProps.getErrorMsg()); 96 } 97 String protocol = protocolPortProps.getProtocol(); 98 String port = protocolPortProps.getPort(); 89 99 int portNum = Integer.parseInt(port); 90 100 … … 94 104 urlSuffix = urlSuffix + "&col="+collection; 95 105 } 96 URL authenticationUrl = new URL( "http", servername, portNum, urlSuffix);106 URL authenticationUrl = new URL(protocol, servername, portNum, urlSuffix); 97 107 98 108 HttpURLConnection conn = (HttpURLConnection)authenticationUrl.openConnection(); … … 120 130 System.out.print(result); // don't add newline to end 121 131 122 } catch ( IOException ex) {132 } catch (Exception ex) { 123 133 ex.printStackTrace(); 124 134 } finally {
Note:
See TracChangeset
for help on using the changeset viewer.