@Override public FacesContext initStartupFacesContext(ServletContext servletContext) { // We cannot use FacesContextFactory, because it is necessary to initialize // before Application and RenderKit factories, so we should use different object. return _createFacesContext(servletContext, true); }
@Override public void destroyShutdownFacesContext(FacesContext facesContext) { _releaseFacesContext(facesContext); }
initCDIIntegration(servletContext, externalContext); initContainerIntegration(servletContext, externalContext); _createEagerBeans(facesContext); _dispatchApplicationEvent(servletContext, PostConstructApplicationEvent.class); initWebsocketIntegration(servletContext, externalContext); checkForDeprecatedContextParams(facesContext); if (Boolean.TRUE.equals(automaticExtensionlessMapping)) initAutomaticExtensionlessMapping(facesContext, servletContext);
initContainerIntegration(servletContext, externalContext); _createEagerBeans(facesContext); _dispatchApplicationEvent(servletContext, PostConstructApplicationEvent.class);
/** * Configures this JSF application. It's required that every * FacesInitializer (i.e. every subclass) calls this method during * initialization. * * @param servletContext the current ServletContext * @param externalContext the current ExternalContext * @param expressionFactory the ExpressionFactory to use * @return the current runtime configuration */ protected RuntimeConfig buildConfiguration(ServletContext servletContext, ExternalContext externalContext, ExpressionFactory expressionFactory) { RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext); runtimeConfig.setExpressionFactory(expressionFactory); // And configure everything new FacesConfigurator(externalContext).configure(); validateFacesConfig(servletContext, externalContext); return runtimeConfig; }
/** * Try to load user-definied ExpressionFactory. Returns <code>null</code>, * if no custom ExpressionFactory was specified. * * @param externalContext the current ExternalContext * @return User-specified ExpressionFactory, or * <code>null</code>, if no no custom implementation was specified */ protected static ExpressionFactory getUserDefinedExpressionFactory(ExternalContext externalContext) { String expressionFactoryClassName = WebConfigParamUtils.getStringInitParameter(externalContext, EXPRESSION_FACTORY); if (expressionFactoryClassName != null && expressionFactoryClassName.trim().length() > 0) { if (log.isLoggable(Level.FINE)) { log.fine("Attempting to load the ExpressionFactory implementation " + "you've specified: '" + expressionFactoryClassName + "'."); } return loadExpressionFactory(expressionFactoryClassName); } return null; }
initContainerIntegration(servletContext, externalContext);
_dispatchApplicationEvent(servletContext, PreDestroyApplicationEvent.class); _callPreDestroyOnInjectedJSFArtifacts(facesContext);
_dispatchApplicationEvent(servletContext, PreDestroyApplicationEvent.class);
initContainerIntegration(servletContext, externalContext); _createEagerBeans(facesContext); _dispatchApplicationEvent(servletContext, PostConstructApplicationEvent.class);
/** * Configures this JSF application. It's required that every * FacesInitializer (i.e. every subclass) calls this method during * initialization. * * @param servletContext the current ServletContext * @param externalContext the current ExternalContext * @param expressionFactory the ExpressionFactory to use * @return the current runtime configuration */ protected RuntimeConfig buildConfiguration(ServletContext servletContext, ExternalContext externalContext, ExpressionFactory expressionFactory) { RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext); runtimeConfig.setExpressionFactory(expressionFactory); // And configure everything new FacesConfigurator(externalContext).configure(); validateFacesConfig(servletContext, externalContext); return runtimeConfig; }
/** * Try to load user-definied ExpressionFactory. Returns <code>null</code>, * if no custom ExpressionFactory was specified. * * @param externalContext the current ExternalContext * @return User-specified ExpressionFactory, or * <code>null</code>, if no no custom implementation was specified */ protected static ExpressionFactory getUserDefinedExpressionFactory(ExternalContext externalContext) { String expressionFactoryClassName = WebConfigParamUtils.getStringInitParameter(externalContext, EXPRESSION_FACTORY); if (expressionFactoryClassName != null && expressionFactoryClassName.trim().length() > 0) { if (log.isLoggable(Level.FINE)) { log.fine("Attempting to load the ExpressionFactory implementation " + "you've specified: '" + expressionFactoryClassName + "'."); } return loadExpressionFactory(expressionFactoryClassName); } return null; }
_dispatchApplicationEvent(servletContext, PreDestroyApplicationEvent.class);
/** * Configures this JSF application. It's required that every * FacesInitializer (i.e. every subclass) calls this method during * initialization. * * @param servletContext the current ServletContext * @param externalContext the current ExternalContext * @param expressionFactory the ExpressionFactory to use * @return the current runtime configuration */ protected RuntimeConfig buildConfiguration(ServletContext servletContext, ExternalContext externalContext, ExpressionFactory expressionFactory) { RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext); runtimeConfig.setExpressionFactory(expressionFactory); // And configure everything new FacesConfigurator(externalContext).configure(); validateFacesConfig(servletContext, externalContext); return runtimeConfig; }
@Override public FacesContext initShutdownFacesContext(ServletContext servletContext) { return _createFacesContext(servletContext, false); }
public void destroyStartupFacesContext(FacesContext facesContext) { _releaseFacesContext(facesContext); }
/** * Try to load user-definied ExpressionFactory. Returns <code>null</code>, * if no custom ExpressionFactory was specified. * * @param externalContext the current ExternalContext * @return User-specified ExpressionFactory, or * <code>null</code>, if no no custom implementation was specified */ protected static ExpressionFactory getUserDefinedExpressionFactory(ExternalContext externalContext) { String expressionFactoryClassName = WebConfigParamUtils.getStringInitParameter(externalContext, EXPRESSION_FACTORY); if (expressionFactoryClassName != null && expressionFactoryClassName.trim().length() > 0) { if (log.isLoggable(Level.FINE)) { log.fine("Attempting to load the ExpressionFactory implementation " + "you've specified: '" + expressionFactoryClassName + "'."); } return loadExpressionFactory(expressionFactoryClassName); } return null; }
/** * Configures this JSF application. It's required that every * FacesInitializer (i.e. every subclass) calls this method during * initialization. * * @param servletContext * the current ServletContext * @param externalContext * the current ExternalContext * @param expressionFactory * the ExpressionFactory to use * * @return the current runtime configuration */ protected RuntimeConfig buildConfiguration(ServletContext servletContext, ExternalContext externalContext, ExpressionFactory expressionFactory) { RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext); runtimeConfig.setExpressionFactory(expressionFactory); ApplicationImpl.setInitializingRuntimeConfig(runtimeConfig); // And configure everything new FacesConfigurator(externalContext).configure(); validateFacesConfig(servletContext, externalContext); return runtimeConfig; }
public FacesContext initStartupFacesContext(ServletContext servletContext) { // We cannot use FacesContextFactory, because it is necessary to initialize // before Application and RenderKit factories, so we should use different object. return _createFacesContext(servletContext, true); }
@Override public void destroyStartupFacesContext(FacesContext facesContext) { _releaseFacesContext(facesContext); }