final String webappDir = servletContext.getRealPath("/");
final String webInfDir = servletContext.getRealPath("/WEB-INF");
loggingConfigurer.configureLogging(webInfDir, new String[0]);
final String configLocation = servletContext.getInitParameter(WebAppConstants.CONFIG_DIR_PARAM);
final ResourceStreamSourceComposite compositeSource = new ResourceStreamSourceComposite(
ResourceStreamSourceContextLoaderClassPath.create(),
new ResourceStreamSourceForWebInf(servletContext)) ;
if ( configLocation != null ) {
LOG.info( "Config override location: " + configLocation );
compositeSource.addResourceStreamSource(ResourceStreamSourceFileSystem.create(configLocation));
} else {
LOG.info( "Config override location: No override location configured" );
}
// will load either from WEB-INF, from the classpath or from config directory.