Servlet
or Filter
may be further configured.
A Registration object whose getClassName
method returns null is considered preliminary. Servlets and
Filters whose implementation class is container implementation specific may be declared without any
servlet-class or filter-class elements, respectively, and will be represented as preliminary
Registration objects. Preliminary registrations must be completed by calling one of the addServlet or
addFilter methods on ServletContext
, and passing in the Servlet or Filter name (obtained via
getName
) along with the supporting Servlet or Filter implementation class name, Class object, or instance,
respectively. In most cases, preliminary registrations will be completed by an appropriate, container-provided
ServletContainerInitializer
.
Modifier and Type | Class and Description |
---|---|
public static interface | Registration.Dynamic
Interface through which a |
Modifier and Type | Method and Description |
---|---|
public String | Returns: the fully qualified class name of the Servlet or Filter that is represented by this Registration, or null if this Registration is preliminaryGets the fully qualified class name of the Servlet or Filter that is represented by this Registration. |
public String | Returns: the value of the initialization parameter with the given name, or null if no initialization parameter with the given name existsthe name of the initialization parameter whose value is requested name)Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object. |
public Map | Returns: Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration objectGets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object. |
public String | Returns: the name of the Servlet or Filter that is represented by this RegistrationGets the name of the Servlet or Filter that is represented by this Registration. |
public boolean | Returns: true if the update was successful, i.e., an initialization parameter with the given name did not already exist for the Servlet or Filter represented by this Registration, and false otherwisethe initialization parameter name name, String the initialization parameter value value)Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration. |
public Set | Returns: the (possibly empty) Set of initialization parameter names that are in conflictthe initialization parameters initParameters)Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration. |
getClassName | back to summary |
---|---|
public String getClassName() Gets the fully qualified class name of the Servlet or Filter that is represented by this Registration.
|
getInitParameter | back to summary |
---|---|
public String getInitParameter(String name) Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object. |
getInitParameters | back to summary |
---|---|
public Map Gets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object. |
getName | back to summary |
---|---|
public String getName() Gets the name of the Servlet or Filter that is represented by this Registration.
|
setInitParameter | back to summary |
---|---|
public boolean setInitParameter(String name, String value) Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration.
|
setInitParameters | back to summary |
---|---|
public Set Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.
The given map of initialization parameters is processed by-value, i.e., for each initialization parameter
contained in the map, this method calls
The returned set is not backed by the
|
Servlet
or Filter
registered via one of the addServlet or
addFilter methods, respectively, on ServletContext
may be further configured.
Modifier and Type | Method and Description |
---|---|
public void | setAsyncSupported(boolean
true if the Servlet or Filter represented by this dynamic Registration supports asynchronous
operations, false otherwise isAsyncSupported)Configures the Servlet or Filter represented by this dynamic Registration as supporting asynchronous operations or not. |
setAsyncSupported | back to summary |
---|---|
public void setAsyncSupported(boolean isAsyncSupported) Configures the Servlet or Filter represented by this dynamic Registration as supporting asynchronous operations or not. By default, servlet and filters do not support asynchronous operations. A call to this method overrides any previous setting.
|