summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'BKUOnline/src/main/java/at')
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java
index 9fe91708..54dbfdea 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java
@@ -70,6 +70,8 @@ public class SpringConfigurator extends Configurator implements
} catch (IOException e) {
log.error("Cannot load config", e);
}
+ } else {
+ log.warn("Cannot load properties, resource: "+resource);
}
}
@@ -91,8 +93,23 @@ public class SpringConfigurator extends Configurator implements
super.configure();
configureSSL();
configureVersion();
+ configureNetwork();
}
+ public void configureNetwork() {
+ String proxyHost = getProperty("HTTPProxyHost");
+ String proxyPort = getProperty("HTTPProxyPort");
+ if (proxyPort == null) {
+ proxyPort = "80";
+ }
+ if (proxyHost != null) {
+ log.debug("Setting proxy server to: "+proxyHost+":"+proxyPort);
+ System.setProperty("http.proxyHost", proxyHost);
+ System.setProperty("http.proxyPort", proxyPort);
+ }
+ log.debug("No proxy specified");
+ }
+
private Set<TrustAnchor> getCACerts() throws IOException,
CertificateException {
Set<TrustAnchor> caCerts = new HashSet<TrustAnchor>();