protected static void setupExternalContext() { if (container.getExternalContext() == null) { if (externalContext != null) { container.setExternalContext(externalContext); } } else if (container.getExternalContext().getApplication() == null && externalContext != null) { container.getExternalContext().setApplication(externalContext.getApplication()); } if (container.getExternalContextComponentDefRegister() == null && externalContextComponentDefRegister != null) { container.setExternalContextComponentDefRegister(externalContextComponentDefRegister); } }
protected LaContainer build(String path, ClassLoader classLoader) { final String realPath = pathResolver.resolvePath(null, path); showReadingLog(null, path, realPath, false); enter(realPath); try { final String ext = getExtension(realPath); final LaContainer container = getBuilder(ext).build(realPath, classLoader); container.setExternalContext(externalContext); container.setExternalContextComponentDefRegister(externalContextComponentDefRegister); return container; } finally { leave(realPath); } }