Package org.springframework.web.context

Examples of org.springframework.web.context.ContextLoader


        if (logger.isInfoEnabled()) logger.info("Spring config locations established as [" + configFilesLocations + "]");
        super.contextInitialized(event);
    }

    @Override protected ContextLoader createContextLoader() {
        return new ContextLoader() {
            @Override protected void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) {
                applicationContext.setConfigLocation(configFilesLocations);
            }
        };
    }
View Full Code Here


  public static final String ARANEA_ROOT_INIT_PARAMETER_NAME = "aranea-application-root";
 
  private WebApplicationContext beanFactory;

  public void init(ServletConfig config) throws ServletException {
    ContextLoader loader = new ContextLoader();   
    beanFactory = loader.initWebApplicationContext(config.getServletContext());
    super.init(config);
  }
View Full Code Here

*/
public class SpringTapestryIntegrationTests extends TestCase {
    public void testSpringIntegration() throws Exception {
        MockServletContext servletContext = new MockServletContext();
        servletContext.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, "classpath:org/springmodules/web/tapestry/applicationContext.xml");
        ContextLoader contextLoader = new ContextLoader();
        contextLoader.initWebApplicationContext(servletContext);

        MockServletConfig servletConfig = new MockServletConfig(servletContext, "servlet");
        ApplicationServlet servlet = new ApplicationServlet();
        servlet.init(servletConfig);

View Full Code Here

            catch (Throwable e) {
                throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
            }
        }
       
        ContextLoader contextLoader = null;
        try {
            contextLoader = contextLoaderClass.newInstance();
        }
        catch (Exception e) {
            throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
View Full Code Here

      catch (Throwable e) {
        throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
      }
    }
   
    ContextLoader contextLoader = null;
    try {
      contextLoader = contextLoaderClass.newInstance();
    }
    catch (Exception e) {
      throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
View Full Code Here

            catch (Throwable e) {
                throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
            }
        }
       
        ContextLoader contextLoader = null;
        try {
            contextLoader = (ContextLoader) contextLoaderClass.newInstance();
        }
        catch (Exception e) {
            throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
View Full Code Here

            catch (Throwable e) {
                throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
            }
        }
       
        ContextLoader contextLoader = null;
        try {
            contextLoader = contextLoaderClass.newInstance();
        }
        catch (Exception e) {
            throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
View Full Code Here

      catch (Throwable e) {
        throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
      }
    }
   
    ContextLoader contextLoader = null;
    try {
      contextLoader = contextLoaderClass.newInstance();
    }
    catch (Exception e) {
      throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
View Full Code Here

      catch (Throwable e) {
        throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
      }
    }
   
    ContextLoader contextLoader = null;
    try {
      contextLoader = contextLoaderClass.newInstance();
    }
    catch (Exception e) {
      throw new ExecutionException("Error instantiating context loader class " + contextLoaderClassName + ": " + e.getMessage(), e);
View Full Code Here

    /* (non-Javadoc)
     * @see org.directwebremoting.guice.spring.BeanFactoryLoader#loadBeanFactory()
     */
    public BeanFactory loadBeanFactory()
    {
        new ContextLoader().initWebApplicationContext(servletContext);
        return WebApplicationContextUtils.getWebApplicationContext(servletContext);
    }
View Full Code Here

TOP

Related Classes of org.springframework.web.context.ContextLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.