Map subComponentsResponce = getClientUtil().GETRequest(path);
Map<String, String> subComponents = (Map<String, String>) subComponentsResponce.get("properties");
// Build up the HTTPContext object using the nodeAddress information
int port = nodeAddress.getHttpPort();
HTTPContext httpContext = new HTTPContext( nodeAddress.getHost(), port );
// Add the servlets to the HTTPContext
String componentName;
String contextRoot = getApplicationContextRoot(name);
for (Map.Entry subComponent : subComponents.entrySet())
{
componentName = subComponent.getKey().toString();
if ( WEBMODULE.equals(subComponent.getValue()) ) {
List<Map> children = (List<Map>) subComponentsResponce.get("children");
// Override the application contextRoot by the webmodul's contextRoot
contextRoot = resolveWebModuleContextRoot(componentName, children);
resolveWebModuleSubComponents(name, componentName, contextRoot, httpContext);
} else if ( SERVLET.equals(subComponent.getValue()) ) {
httpContext.add(new Servlet(componentName, contextRoot));
}
}
return httpContext;
}