|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.web.context
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
Create a new {@code ContextLoader} that will create a web application context based on the "contextClass" and "contextConfigLocation" servlet context-params. See class-level documentation for details on default values for each.Class ContextLoader, constructor ContextLoader(WebApplicationContext)This constructor is typically used when declaring the {@code ContextLoaderListener} subclass as a {@code
} within {@code web.xml}, as a no-arg constructor is required. The created application context will be registered into the ServletContext under the attribute name WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE and subclasses are free to call the .closeWebApplicationContext method on container shutdown to close the application context. @see #ContextLoader(WebApplicationContext) @see #initWebApplicationContext(ServletContext) @see #closeWebApplicationContext(ServletContext)
Create a new {@code ContextLoader} with the given application context. This constructor is useful in Servlet 3.0+ environments where instance-based registration of listeners is possible through the ServletContext.addListener API.Class ContextLoader, WebApplicationContext createWebApplicationContext(ServletContext)The context may or may not yet be ConfigurableApplicationContext#refresh() refreshed. If it (a) is an implementation of ConfigurableWebApplicationContext and (b) has not already been refreshed (the recommended approach), then the following will occur:
If the context has already been refreshed or does not implement {@code ConfigurableWebApplicationContext}, none of the above will occur under the assumption that the user has performed these actions (or not) per his or her specific needs.
- If the given context has not already been assigned an ConfigurableApplicationContext#setId id, one will be assigned to it
- {@code ServletContext} and {@code ServletConfig} objects will be delegated to the application context
- .customizeContext will be called
- Any ApplicationContextInitializers specified through the "contextInitializerClasses" init-param will be applied.
- refresh() will be called
See org.springframework.web.WebApplicationInitializer for usage examples.
In any case, the given application context will be registered into the ServletContext under the attribute name WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE and subclasses are free to call the .closeWebApplicationContext method on container shutdown to close the application context. @param context the application context to manage @see #initWebApplicationContext(ServletContext) @see #closeWebApplicationContext(ServletContext)
Instantiate the root WebApplicationContext for this loader, either the default context class or a custom context class if specified.Class ContextLoader, WebApplicationContext createWebApplicationContext(ServletContext, ApplicationContext)This implementation expects custom contexts to implement the ConfigurableWebApplicationContext interface. Can be overridden in subclasses.
In addition, .customizeContext gets called prior to refreshing the context, allowing subclasses to perform custom modifications to the context. @param sc current servlet context @
param parent the parent ApplicationContext to use, or null if none @return the root WebApplicationContext @see ConfigurableWebApplicationContext
@deprecated as of Spring 3.1 in favor of .createWebApplicationContext(ServletContext) and .configureAndRefreshWebApplicationContext(WebApplicationContextConfigurableWebApplicationContext, ServletContext)
Create a new {@code ContextLoaderListener} that will create a web application context based on the "contextClass" and "contextConfigLocation" servlet context-params. See ContextLoader superclass documentation for details on default values for each.Class ContextLoaderListener, constructor ContextLoaderListener(WebApplicationContext)This constructor is typically used when declaring {@code ContextLoaderListener} as a {@code
} within {@code web.xml}, where a no-arg constructor is required. The created application context will be registered into the ServletContext under the attribute name WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE and the Spring application context will be closed when the .contextDestroyed lifecycle method is invoked on this listener. @see ContextLoader @see #ContextLoaderListener(WebApplicationContext) @see #contextInitialized(ServletContextEvent) @see #contextDestroyed(ServletContextEvent)
Create a new {@code ContextLoaderListener} with the given application context. This constructor is useful in Servlet 3.0+ environments where instance-based registration of listeners is possible through the javax.servlet.ServletContext.addListener API.The context may or may not yet be org.springframework.context.ConfigurableApplicationContext#refresh() refreshed. If
itit (a) is animplementationimplementation of ConfigurableWebApplicationContextandand (b) has notalready been refreshed (the recommended approach), then the following will occur:If the context has already been refreshed or does not implement {@code ConfigurableWebApplicationContext}, none of the above will occur under the assumption that the user has performed these actions (or not) per his or her specific needs.
- If the given context has not already been assigned an org.springframework.context.ConfigurableApplicationContext#setId id, one will be assigned to it
- {@code ServletContext} and {@code ServletConfig} objects will be delegated to the application context
- .customizeContext will be called
- Any ApplicationContextInitializer
ss specified throughthethe "contextInitializerClasses" init-param will be applied.- refresh() will be called
See org.springframework.web.WebApplicationInitializer for usage examples.
In any case, the given application context will be registered into the ServletContext under the attribute name WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE and the Spring application context will be closed when the .contextDestroyed lifecycle method is invoked on this listener. @param context the application context to manage @see #contextInitialized(ServletContextEvent) @see #contextDestroyed(ServletContextEvent)