com.interface21.web.context
Interface WebApplicationContext
- All Superinterfaces:
- ApplicationContext, BeanFactory, ListableBeanFactory, MessageSource, ThemeSource
- All Known Implementing Classes:
- XmlWebApplicationContext, StaticWebApplicationContext
- public interface WebApplicationContext
- extends ApplicationContext, ThemeSource
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 ServletContext methods 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 controller servlets in the MVC framework) has its own child context.
- Since:
- January 19, 2001
- Version:
- $Revision: 1.3 $
- Author:
- Rod Johnson
|
Method Summary |
javax.servlet.ServletContext |
getServletContext()
Return the standard Servlet API ServletContext for this application. |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Give this context access to the standard Servlet API ServletContext for this
web application. |
| Methods inherited from interface com.interface21.context.ApplicationContext |
getDisplayName, getOptions, getParent, getResourceAsStream, getResourceBasePath, getStartupDate, publishEvent, refresh, removeSharedObject, sharedObject, shareObject |
WEB_APPLICATION_CONTEXT_ATTRIBUTE_NAME
public static final java.lang.String WEB_APPLICATION_CONTEXT_ATTRIBUTE_NAME
- Context attribute to bind root WebApplicationContext to on successful startup.
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
throws ApplicationContextException
- Give this context access to the standard Servlet API ServletContext for this
web application. This method amounts to an init method: implementations are
responsible for loading their URL or other config, and reloading.
getServletContext
public javax.servlet.ServletContext getServletContext()
- Return the standard Servlet API ServletContext for this application.
Rod Johnson and Spring contributors 2001-2003.