final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
boolean hasChanged = false;
try
{
ServletConfig config = new PortalServletConfig(sConfig, portalContainer);
WebAppController controller =
(WebAppController)portalContainer.getComponentInstanceOfType(WebAppController.class);
// Set the full classloader of the portal container
Thread.currentThread().setContextClassLoader(portalContainer.getPortalClassLoader());
hasChanged = true;
PortalApplication application = new PortalApplication(config);
application.onInit();
controller.addApplication(application);
controller.register(new PortalRequestHandler());
log.info("The WebAppController has been successfully initialized for the portal '" + portalContainer.getName()
+ "'");
}
catch (Throwable t)
{