if (applicationConfig == null) {
boolean resolveEntities = WebConfigParam.ResolveXMLEntities.getBooleanValue(externalContext);
String requestServletPath = externalContext.getRequestServletPath();
ApplicationConfigInitializer applicationConfigInitializer = new ApplicationConfigInitializerImpl(
requestServletPath, resolveEntities);
try {
applicationConfig = applicationConfigInitializer.initialize();
applicationMap.put(appConfigAttrName, applicationConfig);
// Register the configured factories with the factory extension finder.
FacesConfig facesConfig = applicationConfig.getFacesConfig();
List<ConfiguredElement> configuredFactoryExtensions = facesConfig.getConfiguredFactoryExtensions();