public interface

ConfigurableWebApplicationContext

implements ConfigurableApplicationContext WebApplicationContext
org.springframework.web.context.ConfigurableWebApplicationContext
Known Indirect Subclasses

Class Overview

Interface to be implemented by configurable web application contexts. Supported 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.

Summary

Constants
String SERVLET_CONFIG_BEAN_NAME Name of the ServletConfig environment bean in the factory.
[Expand]
Inherited Constants
From interface org.springframework.beans.factory.BeanFactory
From interface org.springframework.context.ConfigurableApplicationContext
From interface org.springframework.core.io.ResourceLoader
From interface org.springframework.core.io.support.ResourcePatternResolver
From interface org.springframework.web.context.WebApplicationContext
Fields
public static final String APPLICATION_CONTEXT_ID_PREFIX Prefix for ApplicationContext ids that refer to context path and/or servlet name.
[Expand]
Inherited Fields
From interface org.springframework.web.context.WebApplicationContext
Public Methods
abstract String[] getConfigLocations()
Return the config locations for this web application context, or null if none specified.
abstract String getNamespace()
Return the namespace for this web application context, if any.
abstract ServletConfig getServletConfig()
Return the ServletConfig for this web application context, if any.
abstract void setConfigLocation(String configLocation)
Set the config locations for this web application context in init-param style, i.e.
abstract void setConfigLocations(String[] configLocations)
Set the config locations for this web application context.
abstract void setNamespace(String namespace)
Set the namespace for this web application context, to be used for building a default context config location.
abstract void setServletConfig(ServletConfig servletConfig)
Set the ServletConfig for this web application context.
abstract void setServletContext(ServletContext servletContext)
Set the ServletContext for this web application context.
[Expand]
Inherited Methods
From interface org.springframework.beans.factory.BeanFactory
From interface org.springframework.beans.factory.HierarchicalBeanFactory
From interface org.springframework.beans.factory.ListableBeanFactory
From interface org.springframework.context.ApplicationContext
From interface org.springframework.context.ApplicationEventPublisher
From interface org.springframework.context.ConfigurableApplicationContext
From interface org.springframework.context.Lifecycle
From interface org.springframework.context.MessageSource
From interface org.springframework.core.env.EnvironmentCapable
From interface org.springframework.core.io.ResourceLoader
From interface org.springframework.core.io.support.ResourcePatternResolver
From interface org.springframework.web.context.WebApplicationContext

Constants

public static final String SERVLET_CONFIG_BEAN_NAME

Name of the ServletConfig environment bean in the factory.

See Also
  • javax.servlet.ServletConfig
Constant Value: "servletConfig"

Fields

public static final String APPLICATION_CONTEXT_ID_PREFIX

Prefix for ApplicationContext ids that refer to context path and/or servlet name.

Public Methods

public abstract String[] getConfigLocations ()

Return the config locations for this web application context, or null if none specified.

public abstract String getNamespace ()

Return the namespace for this web application context, if any.

public abstract ServletConfig getServletConfig ()

Return the ServletConfig for this web application context, if any.

public abstract void setConfigLocation (String configLocation)

Set the config locations for this web application context in init-param style, i.e. with distinct locations separated by commas, semicolons or whitespace.

If not set, the implementation is supposed to use a default for the given namespace or the root web application context, as appropriate.

public abstract 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 or the root web application context, as appropriate.

public abstract 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.

public abstract void setServletConfig (ServletConfig servletConfig)

Set the ServletConfig for this web application context. Only called for a WebApplicationContext that belongs to a specific Servlet.

See Also

public abstract 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