/** * Load configurations, including both XML and zero-configuration strategies, and update optional * settings, including whether to reload configurations and resource files. */ public void init() { if (configurationManager == null) { configurationManager = createConfigurationManager(BeanSelectionProvider.DEFAULT_BEAN_NAME); } try { init_FileManager(); init_DefaultProperties(); // [1] init_TraditionalXmlConfigurations(); // [2] init_LegacyStrutsProperties(); // [3] init_CustomConfigurationProviders(); // [5] init_FilterInitParameters(); // [6] init_AliasStandardObjects(); // [7] Container container = init_PreloadConfiguration(); container.inject(this); init_CheckWebLogicWorkaround(container); if (!dispatcherListeners.isEmpty()) { for (DispatcherListener l : dispatcherListeners) { l.dispatcherInitialized(this); } } } catch (Exception ex) { if (LOG.isErrorEnabled()) LOG.error("Dispatcher initialization failed", ex); throw new StrutsException(ex); } }
private TextProvider getTextProvider(Object action) { TextProviderFactory tpf = new TextProviderFactory(); if (container != null) { container.inject(tpf); } LocaleProvider localeProvider = getLocaleProvider(action); return tpf.createInstance(action.getClass(), localeProvider); }
private TextProvider getTextProvider() { if (textProvider == null) { TextProviderFactory tpf = new TextProviderFactory(); if (container != null) { container.inject(tpf); } textProvider = tpf.createInstance(getClass(), this); } return textProvider; }