| Package | Description | 
|---|---|
| org.springframework.test.web.servlet | Contains server-side support for testing Spring MVC applications. | 
| org.springframework.test.web.servlet.client | Support for testing Spring MVC applications via
  WebTestClientwithMockMvcfor server request
 handling. | 
| org.springframework.test.web.servlet.htmlunit | Server-side support for testing Spring MVC applications with  MockMvcand HtmlUnit. | 
| org.springframework.test.web.servlet.htmlunit.webdriver | Server-side support for testing Spring MVC applications with  MockMvcand the SeleniumHtmlUnitDriver. | 
| org.springframework.test.web.servlet.setup | Contains built-in  MockMvcBuilderimplementations. | 
| org.springframework.web.bind.support | Support classes for web data binding. | 
| org.springframework.web.context | Contains a variant of the application context interface for web applications,
 and the ContextLoaderListener that bootstraps a root web application context. | 
| org.springframework.web.context.support | Classes supporting the  org.springframework.web.contextpackage,
 such as WebApplicationContext implementations and various utility classes. | 
| org.springframework.web.filter | Provides generic filter base classes allowing for bean-style configuration. | 
| org.springframework.web.jsf | Support classes for integrating a JSF web layer with a Spring service layer
 which is hosted in a Spring root WebApplicationContext. | 
| org.springframework.web.jsf.el | ELResolvers for integrating a JSF web layer with a Spring service layer
 which is hosted in a Spring root WebApplicationContext. | 
| org.springframework.web.servlet | Provides servlets that integrate with the application context
 infrastructure, and the core interfaces and classes for the
 Spring web MVC framework. | 
| org.springframework.web.servlet.support | Support classes for Spring's web MVC framework. | 
| org.springframework.web.servlet.view.tiles3 | Support classes for the integration of
 Tiles 3
 (the standalone version of Tiles) as Spring web view technology. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected MockMvc | MockMvcBuilderSupport. createMockMvc(Filter[] filters,
             MockServletConfig servletConfig,
             WebApplicationContext webAppContext,
             RequestBuilder defaultRequestBuilder,
             Charset defaultResponseCharacterEncoding,
             List<ResultMatcher> globalResultMatchers,
             List<ResultHandler> globalResultHandlers,
             List<DispatcherServletCustomizer> dispatcherServletCustomizers)Delegates to  MockMvcBuilderSupport.createMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)for creation of theMockMvcinstance and configures that instance
 with the supplieddefaultResponseCharacterEncoding. | 
| protected MockMvc | MockMvcBuilderSupport. createMockMvc(Filter[] filters,
             MockServletConfig servletConfig,
             WebApplicationContext webAppContext,
             RequestBuilder defaultRequestBuilder,
             List<ResultMatcher> globalResultMatchers,
             List<ResultHandler> globalResultHandlers,
             List<DispatcherServletCustomizer> dispatcherServletCustomizers) | 
| Modifier and Type | Method and Description | 
|---|---|
| static MockMvcWebTestClient.MockMvcServerSpec<?> | MockMvcWebTestClient. bindToApplicationContext(WebApplicationContext context)Begin creating a  WebTestClientby providing aWebApplicationContextwith Spring MVC infrastructure and
 controllers. | 
| Modifier and Type | Method and Description | 
|---|---|
| static MockMvcWebClientBuilder | MockMvcWebClientBuilder. webAppContextSetup(WebApplicationContext context)Create a new  MockMvcWebClientBuilderbased on the suppliedWebApplicationContext. | 
| static MockMvcWebClientBuilder | MockMvcWebClientBuilder. webAppContextSetup(WebApplicationContext context,
                  MockMvcConfigurer configurer)Create a new  MockMvcWebClientBuilderbased on the suppliedWebApplicationContextandMockMvcConfigurer. | 
| Constructor and Description | 
|---|
| MockMvcWebClientBuilder(WebApplicationContext context) | 
| MockMvcWebClientBuilder(WebApplicationContext context,
                       MockMvcConfigurer configurer) | 
| MockMvcWebConnectionBuilderSupport(WebApplicationContext context)Create a new instance using the supplied  WebApplicationContext. | 
| MockMvcWebConnectionBuilderSupport(WebApplicationContext context,
                                  MockMvcConfigurer configurer)Create a new instance using the supplied  WebApplicationContextandMockMvcConfigurer. | 
| Modifier and Type | Method and Description | 
|---|---|
| static MockMvcHtmlUnitDriverBuilder | MockMvcHtmlUnitDriverBuilder. webAppContextSetup(WebApplicationContext context)Create a new  MockMvcHtmlUnitDriverBuilderbased on the suppliedWebApplicationContext. | 
| static MockMvcHtmlUnitDriverBuilder | MockMvcHtmlUnitDriverBuilder. webAppContextSetup(WebApplicationContext context,
                  MockMvcConfigurer configurer)Create a new  MockMvcHtmlUnitDriverBuilderbased on the suppliedWebApplicationContextandMockMvcConfigurer. | 
| Constructor and Description | 
|---|
| MockMvcHtmlUnitDriverBuilder(WebApplicationContext context) | 
| MockMvcHtmlUnitDriverBuilder(WebApplicationContext context,
                            MockMvcConfigurer configurer) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract WebApplicationContext | AbstractMockMvcBuilder. initWebAppContext()A method to obtain the  WebApplicationContextto be passed to theDispatcherServlet. | 
| protected WebApplicationContext | DefaultMockMvcBuilder. initWebAppContext() | 
| protected WebApplicationContext | StandaloneMockMvcBuilder. initWebAppContext() | 
| Modifier and Type | Method and Description | 
|---|---|
| RequestPostProcessor | SharedHttpSessionConfigurer. beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder,
                    WebApplicationContext context) | 
| RequestPostProcessor | MockMvcConfigurerAdapter. beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder,
                    WebApplicationContext cxt) | 
| default RequestPostProcessor | MockMvcConfigurer. beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder,
                    WebApplicationContext context)Invoked when the MockMvc instance is about to be created with the MockMvc
 builder and the Spring WebApplicationContext that will be passed to the
  DispatcherServlet. | 
| static DefaultMockMvcBuilder | MockMvcBuilders. webAppContextSetup(WebApplicationContext context)Build a  MockMvcinstance using the given, fully initialized
 (i.e., refreshed)WebApplicationContext. | 
| Constructor and Description | 
|---|
| DefaultMockMvcBuilder(WebApplicationContext webAppContext)Protected constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected WebApplicationContext | SpringWebConstraintValidatorFactory. getWebApplicationContext()Retrieve the Spring  WebApplicationContextto use. | 
| Modifier and Type | Interface and Description | 
|---|---|
| interface  | ConfigurableWebApplicationContextInterface to be implemented by configurable web application contexts. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract WebApplicationContext | AbstractContextLoaderInitializer. createRootApplicationContext()Create the "root" application context to be provided to the
  ContextLoaderListener. | 
| protected WebApplicationContext | ContextLoader. createWebApplicationContext(ServletContext sc)Instantiate the root WebApplicationContext for this loader, either the
 default context class or a custom context class if specified. | 
| static WebApplicationContext | ContextLoader. getCurrentWebApplicationContext()Obtain the Spring root web application context for the current thread
 (i.e. | 
| WebApplicationContext | ContextLoader. initWebApplicationContext(ServletContext servletContext)Initialize Spring's web application context for the given servlet context,
 using the application context provided at construction time, or creating a new one
 according to the " contextClass" and
 "contextConfigLocation" context-params. | 
| Constructor and Description | 
|---|
| ContextLoader(WebApplicationContext context)Create a new  ContextLoaderwith the given application context. | 
| ContextLoaderListener(WebApplicationContext context)Create a new  ContextLoaderListenerwith the given application context. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | AbstractRefreshableWebApplicationContextAbstractRefreshableApplicationContextsubclass which implements theConfigurableWebApplicationContextinterface for web environments. | 
| class  | AnnotationConfigWebApplicationContextWebApplicationContextimplementation which accepts component classes as input — in particular@Configurationclasses, but also plain@Componentclasses as well as JSR-330 compliant classes usingjavax.injectannotations. | 
| class  | GenericWebApplicationContextSubclass of  GenericApplicationContext, suitable for web environments. | 
| class  | GroovyWebApplicationContextWebApplicationContextimplementation which takes
 its configuration from Groovy bean definition scripts and/or XML files, as understood by
 aGroovyBeanDefinitionReader. | 
| class  | StaticWebApplicationContextStatic  WebApplicationContextimplementation for testing. | 
| class  | XmlWebApplicationContextWebApplicationContextimplementation
 which takes its configuration from XML documents, understood by anXmlBeanDefinitionReader. | 
| Modifier and Type | Method and Description | 
|---|---|
| static WebApplicationContext | WebApplicationContextUtils. findWebApplicationContext(ServletContext sc)Find a unique  WebApplicationContextfor this web app: either the
 root web app context (preferred) or a uniqueWebApplicationContextamong the registeredServletContextattributes (typically coming
 from a singleDispatcherServletin the current web application). | 
| static WebApplicationContext | WebApplicationContextUtils. getRequiredWebApplicationContext(ServletContext sc)Find the root  WebApplicationContextfor this web app, typically
 loaded viaContextLoaderListener. | 
| protected WebApplicationContext | WebApplicationObjectSupport. getWebApplicationContext()Return the current application context as WebApplicationContext. | 
| WebApplicationContext | ContextExposingHttpServletRequest. getWebApplicationContext()Return the WebApplicationContext that this request runs in. | 
| static WebApplicationContext | WebApplicationContextUtils. getWebApplicationContext(ServletContext sc)Find the root  WebApplicationContextfor this web app, typically
 loaded viaContextLoaderListener. | 
| static WebApplicationContext | WebApplicationContextUtils. getWebApplicationContext(ServletContext sc,
                        String attrName)Find a custom  WebApplicationContextfor this web app. | 
| Constructor and Description | 
|---|
| ContextExposingHttpServletRequest(HttpServletRequest originalRequest,
                                 WebApplicationContext context)Create a new ContextExposingHttpServletRequest for the given request. | 
| ContextExposingHttpServletRequest(HttpServletRequest originalRequest,
                                 WebApplicationContext context,
                                 Set<String> exposedContextBeanNames)Create a new ContextExposingHttpServletRequest for the given request. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected WebApplicationContext | DelegatingFilterProxy. findWebApplicationContext()Return the  WebApplicationContextpassed in at construction time, if available. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Filter | DelegatingFilterProxy. initDelegate(WebApplicationContext wac)Initialize the Filter delegate, defined as bean the given Spring
 application context. | 
| Constructor and Description | 
|---|
| DelegatingFilterProxy(String targetBeanName,
                     WebApplicationContext wac)Create a new  DelegatingFilterProxythat will retrieve the named target
 bean from the given SpringWebApplicationContext. | 
| Modifier and Type | Method and Description | 
|---|---|
| static WebApplicationContext | FacesContextUtils. getRequiredWebApplicationContext(FacesContext fc)Find the root  WebApplicationContextfor this web app, typically
 loaded viaContextLoaderListener. | 
| static WebApplicationContext | FacesContextUtils. getWebApplicationContext(FacesContext fc)Find the root  WebApplicationContextfor this web app, typically
 loaded viaContextLoaderListener. | 
| protected WebApplicationContext | DelegatingNavigationHandlerProxy. getWebApplicationContext(FacesContext facesContext)Retrieve the web application context to delegate bean name resolution to. | 
| protected WebApplicationContext | DelegatingPhaseListenerMulticaster. getWebApplicationContext(FacesContext facesContext)Retrieve the web application context to delegate bean name resolution to. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected WebApplicationContext | SpringBeanFacesELResolver. getWebApplicationContext(ELContext elContext)Retrieve the web application context to delegate bean name resolution to. | 
| protected WebApplicationContext | WebApplicationContextFacesELResolver. getWebApplicationContext(ELContext elContext)Retrieve the  WebApplicationContextreference to expose. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected WebApplicationContext | FrameworkServlet. createWebApplicationContext(ApplicationContext parent)Instantiate the WebApplicationContext for this servlet, either a default
  XmlWebApplicationContextor acustom context class, if set. | 
| protected WebApplicationContext | FrameworkServlet. createWebApplicationContext(WebApplicationContext parent)Instantiate the WebApplicationContext for this servlet, either a default
  XmlWebApplicationContextor acustom context class, if set. | 
| protected WebApplicationContext | FrameworkServlet. findWebApplicationContext() | 
| WebApplicationContext | FrameworkServlet. getWebApplicationContext()Return this servlet's WebApplicationContext. | 
| protected WebApplicationContext | FrameworkServlet. initWebApplicationContext()Initialize and publish the WebApplicationContext for this servlet. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected WebApplicationContext | FrameworkServlet. createWebApplicationContext(WebApplicationContext parent)Instantiate the WebApplicationContext for this servlet, either a default
  XmlWebApplicationContextor acustom context class, if set. | 
| Constructor and Description | 
|---|
| DispatcherServlet(WebApplicationContext webApplicationContext)Create a new  DispatcherServletwith the given web application context. | 
| FrameworkServlet(WebApplicationContext webApplicationContext)Create a new  FrameworkServletwith the given web application context. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected WebApplicationContext | AbstractAnnotationConfigDispatcherServletInitializer. createRootApplicationContext()Create the "root" application context to be provided to the
  ContextLoaderListener. | 
| protected WebApplicationContext | AbstractAnnotationConfigDispatcherServletInitializer. createServletApplicationContext()Create a servlet application context to be provided to the  DispatcherServlet. | 
| protected abstract WebApplicationContext | AbstractDispatcherServletInitializer. createServletApplicationContext()Create a servlet application context to be provided to the  DispatcherServlet. | 
| static WebApplicationContext | RequestContextUtils. findWebApplicationContext(HttpServletRequest request)Look for the WebApplicationContext associated with the DispatcherServlet
 that has initiated request processing, and for the global context if none
 was found associated with the current request. | 
| static WebApplicationContext | RequestContextUtils. findWebApplicationContext(HttpServletRequest request,
                         ServletContext servletContext)Look for the WebApplicationContext associated with the DispatcherServlet
 that has initiated request processing, and for the global context if none
 was found associated with the current request. | 
| WebApplicationContext | RequestContext. getWebApplicationContext()Return the current WebApplicationContext. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected FrameworkServlet | AbstractDispatcherServletInitializer. createDispatcherServlet(WebApplicationContext servletAppContext)Create a  DispatcherServlet(or other kind ofFrameworkServlet-derived
 dispatcher) with the specifiedWebApplicationContext. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract ViewPreparer | AbstractSpringPreparerFactory. getPreparer(String name,
           WebApplicationContext context)Obtain a preparer instance for the given preparer name,
 based on the given Spring WebApplicationContext. | 
| protected ViewPreparer | SpringBeanPreparerFactory. getPreparer(String name,
           WebApplicationContext context) | 
| protected ViewPreparer | SimpleSpringPreparerFactory. getPreparer(String name,
           WebApplicationContext context) |