Simple extension of HttpServlet which treats
its config parameters (init-param entries within the
servlet tag in web.xml) as bean properties.
A handy superclass for any type of servlet. Type conversion of config
parameters is automatic, with the corresponding setter method getting
invoked with the converted value. It is also possible for subclasses to
specify required properties. Parameters without matching bean property
setter will simply be ignored.
This servlet leaves request handling to subclasses, inheriting the default
behavior of HttpServlet (doGet, doPost, etc).
This generic servlet base class has no dependency on the Spring
ApplicationContext concept. Simple
servlets usually don't load their own context but rather access service
beans from the Spring root application context, accessible via the
filter's ServletContext (see
WebApplicationContextUtils).
The FrameworkServlet class is a more specific servlet base
class which loads its own application context. FrameworkServlet serves
as direct base class of Spring's full-fledged DispatcherServlet.
Subclasses can invoke this method to specify that this property
(which must match a JavaBean property they expose) is mandatory,
and must be supplied as a config parameter.
protected final void addRequiredProperty(java.lang.String property)
Subclasses can invoke this method to specify that this property
(which must match a JavaBean property they expose) is mandatory,
and must be supplied as a config parameter. This should be called
from the constructor of a subclass.
This method is only relevant in case of traditional initialization
driven by a ServletConfig instance.
Parameters:
property - name of the required property
setEnvironment
public void setEnvironment(Environment environment)