* Get proxy properties from the context init params.
*
* @return proxy properties
*/
private static ProxyProperties getProxyProperties(ServletConfig config) {
ProxyProperties proxyProps;
String host = config.getInitParameter("proxy.host");
LOG.debug("proxy.host: " + host);
if (host == null) {
proxyProps = null;
} else {
proxyProps = new ProxyProperties();
String port = config.getInitParameter("proxy.port");
String username = config.getInitParameter("proxy.username");
String password = config.getInitParameter("proxy.password");
String domain = config.getInitParameter("proxy.domain");
proxyProps.setProxyHostName(host);
proxyProps.setProxyPort(Integer.parseInt(port));
proxyProps.setUserName(username);
proxyProps.setPassword(password);
proxyProps.setDomain(domain);
}
return proxyProps;
}