org.springframework.web.context
Interface ConfigurableWebApplicationContext

All Known Implementing Classes:
StaticWebApplicationContext, XmlWebApplicationContext

public interface ConfigurableWebApplicationContext
extends ConfigurableApplicationContext, WebApplicationContext

Interface to be implemented by configurable web application contexts. Expected by ContextLoader and FrameworkServlet.

Note: The setters of this interface need to be called before an invocation of the refresh method inherited from ConfigurableApplicationContext. They do not cause an initialization of the context on their own.

Author:
Juergen Hoeller
Since: 05.12.2003
See Also: org.springframework.context.ConfigurableApplicationContext.refresh(), ContextLoader.createWebApplicationContext(ServletContext,org.springframework.context.ApplicationContext), org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(org.springframework.web.context.WebApplicationContext)

Field Summary
 final static StringCONFIG_LOCATION_DELIMITERS
          Any number of these characters are considered delimiters between multiple context paths in a single-String config location.

Fields inherited from interface org.springframework.web.context.WebApplicationContext
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE

Method Summary
 voidsetConfigLocations(String[] configLocations)
          Set the config locations for this web application context.
 voidsetNamespace(String namespace)
          Set the namespace for this web application context, to be used for building a default context config location.
 voidsetServletContext(ServletContext servletContext)
          Set the ServletContext for this web application context.

Methods inherited from interface org.springframework.context.ConfigurableApplicationContext
close, getBeanFactory, refresh, setParent

Methods inherited from interface org.springframework.context.ApplicationContext
getDisplayName, getParent, getResource, getStartupDate, publishEvent

Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory
getParentBeanFactory

Methods inherited from interface org.springframework.beans.factory.BeanFactory
containsBean, getAliases, getBean, getBean, isSingleton

Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory
containsBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeansOfType

Methods inherited from interface org.springframework.context.MessageSource
getMessage, getMessage, getMessage

Methods inherited from interface org.springframework.web.context.WebApplicationContext
getServletContext

Methods inherited from interface org.springframework.ui.context.ThemeSource
getTheme

Field Detail

CONFIG_LOCATION_DELIMITERS

public final static String CONFIG_LOCATION_DELIMITERS
Any number of these characters are considered delimiters between multiple context paths in a single-String config location.
See Also:
ContextLoader.CONFIG_LOCATION_PARAM, org.springframework.web.servlet.FrameworkServlet.setContextConfigLocation(java.lang.String)
Method Detail

setConfigLocations

public void setConfigLocations(String[] configLocations)
Set the config locations for this web application context. If not set, the implementation is supposed to use a default for the given namespace respectively the root web application context.

setNamespace

public void setNamespace(String namespace)
Set the namespace for this web application context, to be used for building a default context config location. The root web application context does not have a namespace.

setServletContext

public void setServletContext(ServletContext servletContext)
Set the ServletContext for this web application context.

Does not cause an initialization of the context: refresh needs to be called after the setting of all configuration properties.

See Also:
org.springframework.context.ConfigurableApplicationContext.refresh()

Association Links

to Class java.lang.String

Any number of these characters are considered delimiters between multiple context paths in a single-String config location.

see ContextLoader#CONFIG_LOCATION_PARAM, org.springframework.web.servlet.FrameworkServlet#setContextConfigLocation