String sProxyConfigClass = oServletConfig.getInitParameter(PROXY_CONFIG_CLASS);
if (sProxyConfigClass == null) sProxyConfigClass = DEFAULT_PROXY_CONFIG_CLASS;
// initialize the configuration object
ProxyConfig oConfig = null;
try
{
Class oConfigClass = Class.forName(sProxyConfigClass);
oConfig = (ProxyConfig) oConfigClass.newInstance();
Hashtable oParameters = new Hashtable();
oParameters.put(ProxyConfig.PROXY_CONTEXT_KEY, oServletConfig.getServletContext());
Enumeration oEnum = oServletConfig.getInitParameterNames();
while (oEnum.hasMoreElements())
{
String sKey = (String) oEnum.nextElement();
oParameters.put(sKey, oServletConfig.getInitParameter(sKey));
}
oConfig.init(oParameters);
} catch (Exception ex) {
throw new ServletException("Failed to instantiate server config class " + sProxyConfigClass, ex);
}