Example usage for org.springframework.web.servlet FrameworkServlet DEFAULT_CONTEXT_CLASS

List of usage examples for org.springframework.web.servlet FrameworkServlet DEFAULT_CONTEXT_CLASS

Introduction

In this page you can find the example usage for org.springframework.web.servlet FrameworkServlet DEFAULT_CONTEXT_CLASS.

Prototype

Class DEFAULT_CONTEXT_CLASS

To view the source code for org.springframework.web.servlet FrameworkServlet DEFAULT_CONTEXT_CLASS.

Click Source Link

Document

Default context class for FrameworkServlet.

Usage

From source file:com.griddynamics.banshun.web.ScanningTest.java

@Before
public void init() throws Exception {
    tester = new ServletTester();
    XmlWebApplicationContext wac;//from  ww  w.  ja  v  a  2 s . c o  m
    tester.setAttribute(Servlet.springCtxAttrName,
            wac = (XmlWebApplicationContext) FrameworkServlet.DEFAULT_CONTEXT_CLASS.newInstance());
    wac.setConfigLocation("classpath:/com/griddynamics/banshun/scan-test/parent-context.xml");
    wac.refresh();
    tester.addServlet(Servlet.class, "*.html");
    tester.start();
}

From source file:com.griddynamics.banshun.web.NestedControllerTest.java

@Before
public void init() throws Exception {
    tester = new ServletTester();
    XmlWebApplicationContext wac;//from ww w.  j  a  v a 2s  .c  om
    tester.setAttribute(Servlet.springCtxAttrName,
            wac = (XmlWebApplicationContext) FrameworkServlet.DEFAULT_CONTEXT_CLASS.newInstance());
    wac.setConfigLocation("classpath:/com/griddynamics/banshun/controllers-test/parent-context.xml");
    wac.refresh();
    tester.addServlet(Servlet.class, "*.html");
    tester.start();
}