ClassLoader cl = getClass().getClassLoader();
final ConfigurationFactory configFactory = new DefaultConfigurationFactory(cl);
final ContainerFactory containerFactory = new DefaultContainerFactory(cl);
final DeployerFactory deployerFactory = new DefaultDeployerFactory(cl);
Container container = getContainer(configFactory, containerFactory, getContainerId());
deploy(deployerFactory, listener, container, f, contextPath);
return true;
}
});