jakarta.servlet.Servlet registered with the WebappContext.
| Modifier and Type | Field and Description |
|---|---|
| protected ExpectationHandler | |
| protected boolean | |
| protected int | |
| private String | runAs
The run-as identity for this servlet. |
| protected Servlet | |
| protected Class | |
| protected final ArraySet |
| Access | Constructor and Description |
|---|---|
| protected | ServletRegistration(final WebappContext
the owning ctx, final String WebappContext.the name of the Filter. name, final String the fully qualified class name of the servletClassName)Servlet implementation.Creates a new ServletRegistration associated with the specified |
| protected | ServletRegistration(final WebappContext
the owning ctx, final String WebappContext.the name of the Filter. name, final Servlet the servlet)Servlet instance.Creates a new ServletRegistration associated with the specified |
| protected | ServletRegistration(final WebappContext
the owning ctx, final String WebappContext.the name of the Filter. name, final Class<? extends Servlet> the class of the servletClass)Servlet implementation.Creates a new ServletRegistration associated with the specified |
| Modifier and Type | Method and Description |
|---|---|
| public Set | Returns: the (possibly empty) Set of URL patterns that are already mapped to a different Servletthe URL patterns of the servlet mapping urlPatterns)Implements jakarta. Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration. |
| public int | compareTo(ServletRegistration o)
Implements java. Compares this object with the specified object for order. |
| public ExpectationHandler | Returns: theExpectationHandler responsible for processing Expect: header (for example "Expect:
100-Continue").Get the |
| public Collection | Returns: a (possibly empty)Collection of the currently available mappings of the Servlet represented by
this ServletRegistrationImplements jakarta. Gets the currently available mappings of the Servlet represented by this |
| public String | getRunAsRole()
Implements jakarta. Gets the name of the runAs role of the Servlet represented by this |
| public void | setAsyncSupported(boolean isAsyncSupported)
Implements jakarta. Configures the Servlet or Filter represented by this dynamic Registration as supporting asynchronous operations or not. |
| public void | setExpectationHandler(ExpectationHandler
the expectationHandler)ExpectationHandler responsible for processing Expect: header (for
example "Expect: 100-Continue").Set the |
| public void | setLoadOnStartup(int
the initialization priority of the Servlet loadOnStartup)Implements jakarta. Sets the |
| public void | setMultipartConfig(MultipartConfigElement multipartConfig)
Implements jakarta. Sets the |
| public void | setRunAsRole(String roleName)
Implements jakarta. Sets the name of the |
| public Set | setServletSecurity(ServletSecurityElement constraint)
Implements jakarta. Sets the |
| public String |
| expectationHandler | back to summary |
|---|---|
| protected ExpectationHandler expectationHandler | |
| isAsyncSupported | back to summary |
|---|---|
| protected boolean isAsyncSupported | |
| loadOnStartup | back to summary |
|---|---|
| protected int loadOnStartup | |
| runAs | back to summary |
|---|---|
| private String runAs The run-as identity for this servlet. | |
| servlet | back to summary |
|---|---|
| protected Servlet servlet | |
| servletClass | back to summary |
|---|---|
| protected Class<? extends Servlet> servletClass | |
| urlPatterns | back to summary |
|---|---|
| protected final ArraySet<String> urlPatterns | |
| ServletRegistration | back to summary |
|---|---|
| protected ServletRegistration(final WebappContext ctx, final String name, final String servletClassName) Creates a new ServletRegistration associated with the specified
| |
| ServletRegistration | back to summary |
|---|---|
| protected ServletRegistration(final WebappContext ctx, final String name, final Servlet servlet) Creates a new ServletRegistration associated with the specified
| |
| ServletRegistration | back to summary |
|---|---|
| protected ServletRegistration(final WebappContext ctx, final String name, final Class<? extends Servlet> servletClass) Creates a new ServletRegistration associated with the specified
| |
| addMapping | back to summary |
|---|---|
| public Set Implements jakarta. Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration. If any of the specified URL patterns are already mapped to a different Servlet, no updates will be performed. If this method is called multiple times, each successive call adds to the effects of the former.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(ServletRegistration o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| getExpectationHandler | back to summary |
|---|---|
| public ExpectationHandler getExpectationHandler() Get the
| |
| getMappings | back to summary |
|---|---|
| public Collection Implements jakarta. Gets the currently available mappings of the Servlet represented by this
If permitted, any changes to the returned
| |
| getRunAsRole | back to summary |
|---|---|
| public String getRunAsRole() Implements jakarta. Doc from jakarta. Gets the name of the runAs role of the Servlet represented by this
| |
| setAsyncSupported | back to summary |
|---|---|
| public void setAsyncSupported(boolean isAsyncSupported) Implements jakarta. Doc from jakarta. 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.
| |
| setExpectationHandler | back to summary |
|---|---|
| public void setExpectationHandler(ExpectationHandler expectationHandler) Set the
| |
| setLoadOnStartup | back to summary |
|---|---|
| public void setLoadOnStartup(int loadOnStartup) Implements jakarta. Sets the
A loadOnStartup value of greater than or equal to zero indicates to the container the initialization
priority of the Servlet. In this case, the container must instantiate and initialize the Servlet during the
initialization phase of the WebappContext, that is, after it has invoked all of the ServletContextListener objects
configured for the WebappContext at their
If loadOnStartup is a negative integer, the container is free to instantiate and initialize the Servlet lazily.
The default value for loadOnStartup is
A call to this method overrides any previous setting.
| |
| setMultipartConfig | back to summary |
|---|---|
| public void setMultipartConfig(MultipartConfigElement multipartConfig) Implements jakarta. Doc from jakarta. Sets the
| |
| setRunAsRole | back to summary |
|---|---|
| public void setRunAsRole(String roleName) Implements jakarta. Doc from jakarta. Sets the name of the
| |
| setServletSecurity | back to summary |
|---|---|
| public Set Implements jakarta. Doc from jakarta. Sets the
This method applies to all mappings added to this
If a URL pattern of this ServletRegistration is an exact target of a
If a URL pattern of this ServletRegistration is an exact target of a security constraint that was established via the
If a URL pattern of this ServletRegistration is neither the exact target of a security constraint that was
established via the
The returned set is not backed by the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |