This class offers the following functionality:
Subclasses must implement {@link #doService} to handle requests. Because this extends{@link HttpServletBean} rather than HttpServlet directly, bean properties areautomatically mapped onto it. Subclasses can override {@link #initFrameworkServlet()}for custom initialization.
Detects a "contextClass" parameter at the servlet init-param level, falling back to the default context class, {@link org.springframework.web.context.support.XmlWebApplicationContext}, if not found. Note that, with the default FrameworkServlet, a custom context class needs to implement the {@link org.springframework.web.context.ConfigurableWebApplicationContext} SPI.
Passes a "contextConfigLocation" servlet init-param to the context instance, parsing it into potentially multiple file paths which can be separated by any number of commas and spaces, like "test-servlet.xml, myServlet.xml". If not explicitly specified, the context implementation is supposed to build a default location from the namespace of the servlet.
Note: In case of multiple config locations, later bean definitions will override ones defined in earlier loaded files, at least when using Spring's default ApplicationContext implementation. This can be leveraged to deliberately override certain bean definitions via an extra XML file.
The default namespace is "'servlet-name'-servlet", e.g. "test-servlet" for a servlet-name "test" (leading to a "/WEB-INF/test-servlet.xml" default location with XmlWebApplicationContext). The namespace can also be set explicitly via the "namespace" servlet init-param. @author Rod Johnson @author Juergen Hoeller @author Sam Brannen @see #doService @see #setContextClass @see #setContextConfigLocation @see #setNamespace
|
|
|
|
|
|
|
|
|
|
|
|