diff options
author | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-09-19 12:17:47 +0000 |
---|---|---|
committer | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-09-19 12:17:47 +0000 |
commit | 9ca314eced8a73f58282684597468f98621ac502 (patch) | |
tree | 296c6617b5ebc2d0002098bdeece45e21c816ba0 /BKUOnline/src | |
parent | 40e57f6c9101ddcc00422d95086d6a485c3ceda2 (diff) | |
download | mocca-9ca314eced8a73f58282684597468f98621ac502.tar.gz mocca-9ca314eced8a73f58282684597468f98621ac502.tar.bz2 mocca-9ca314eced8a73f58282684597468f98621ac502.zip |
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@53 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src')
-rw-r--r-- | BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java | 17 | ||||
-rw-r--r-- | BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties | 3 |
2 files changed, 20 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>();
diff --git a/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties b/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties index cdc2bfad..42b0d93e 100644 --- a/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties +++ b/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties @@ -41,3 +41,6 @@ SSL.sslProtocol=TLS ValidateHashDataInputs=true
+
+HTTPProxyHost=taranis.iaik.tugraz.at
+HTTPProxyPort=8888
|