|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebApplicationContext
Interface to provide configuration for a web application. This is read-only while the application is running, but may be reloaded if the implementation supports this.
This interface adds a getServletContext()
method to the generic
ApplicationContext interface, and defines a well-known application attribute name
that the root context must be bound to in the bootstrap process.
Like generic application contexts, web application contexts are hierarchical. There is a single root context per application, while each servlet in the application (including a dispatcher servlet in the MVC framework) has its own child context.
In addition to standard application context lifecycle capabilities,
WebApplicationContext implementations need to detect ServletContextAware
beans and invoke the setServletContext
method accordingly.
ServletContextAware.setServletContext(ServletContext)
Field Summary | |
---|---|
static java.lang.String |
CONTEXT_ATTRIBUTES_BEAN_NAME
Name of the ServletContext/PortletContext attributes environment bean in the factory. |
static java.lang.String |
CONTEXT_PARAMETERS_BEAN_NAME
Name of the ServletContext/PortletContext init-params environment bean in the factory. |
static java.lang.String |
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
Context attribute to bind root WebApplicationContext to on successful startup. |
static java.lang.String |
SCOPE_APPLICATION
Scope identifier for the global web application scope: "application". |
static java.lang.String |
SCOPE_GLOBAL_SESSION
Scope identifier for global session scope: "globalSession". |
static java.lang.String |
SCOPE_REQUEST
Scope identifier for request scope: "request". |
static java.lang.String |
SCOPE_SESSION
Scope identifier for session scope: "session". |
static java.lang.String |
SERVLET_CONTEXT_BEAN_NAME
Name of the ServletContext environment bean in the factory. |
Fields inherited from interface org.springframework.beans.factory.BeanFactory |
---|
FACTORY_BEAN_PREFIX |
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
CLASSPATH_ALL_URL_PREFIX |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
---|
CLASSPATH_URL_PREFIX |
Method Summary | |
---|---|
ServletContext |
getServletContext()
Return the standard Servlet API ServletContext for this application. |
Methods inherited from interface org.springframework.context.ApplicationContext |
---|
getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate |
Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory |
---|
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation |
Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory |
---|
containsLocalBean, getParentBeanFactory |
Methods inherited from interface org.springframework.beans.factory.BeanFactory |
---|
containsBean, getAliases, getBean, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch |
Methods inherited from interface org.springframework.context.MessageSource |
---|
getMessage, getMessage, getMessage |
Methods inherited from interface org.springframework.context.ApplicationEventPublisher |
---|
publishEvent |
Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
getResources |
Methods inherited from interface org.springframework.core.io.ResourceLoader |
---|
getClassLoader, getResource |
Field Detail |
---|
static final java.lang.String ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
Note: If the startup of the root context fails, this attribute can contain an exception or error as value. Use WebApplicationContextUtils for convenient lookup of the root WebApplicationContext.
WebApplicationContextUtils.getWebApplicationContext(ServletContext)
,
WebApplicationContextUtils.getRequiredWebApplicationContext(ServletContext)
static final java.lang.String SCOPE_REQUEST
static final java.lang.String SCOPE_SESSION
static final java.lang.String SCOPE_GLOBAL_SESSION
static final java.lang.String SCOPE_APPLICATION
static final java.lang.String SERVLET_CONTEXT_BEAN_NAME
javax.servlet.ServletContext
,
Constant Field Valuesstatic final java.lang.String CONTEXT_PARAMETERS_BEAN_NAME
Note: Possibly merged with ServletConfig/PortletConfig parameters. ServletConfig parameters override ServletContext parameters of the same name.
javax.servlet.ServletContext#getInitParameterNames()
,
javax.servlet.ServletContext#getInitParameter(String)
,
javax.servlet.ServletConfig#getInitParameterNames()
,
javax.servlet.ServletConfig#getInitParameter(String)
,
Constant Field Valuesstatic final java.lang.String CONTEXT_ATTRIBUTES_BEAN_NAME
javax.servlet.ServletContext#getAttributeNames()
,
javax.servlet.ServletContext#getAttribute(String)
,
Constant Field ValuesMethod Detail |
---|
ServletContext getServletContext()
Also available for a Portlet application, in addition to the PortletContext.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |