Servlet may be further configured.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ServletRegistration.
Interface through which a |
| 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)Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration. |
| public Collection | Returns: a (possibly empty)Collection of the currently available mappings of the Servlet represented by
this ServletRegistrationGets the currently available mappings of the Servlet represented by this |
| public String | Returns: the name of the runAs role, or null if the Servlet is configured to run as its callerGets the name of the runAs role of the Servlet represented by this |
| addMapping | back to summary |
|---|---|
| public Set 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.
The returned set is not backed by the
| |
| getMappings | back to summary |
|---|---|
| public Collection 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() Gets the name of the runAs role of the Servlet represented by this
| |
Servlet registered via one of the addServlet methods on
ServletContext may be further configured.
| Modifier and Type | Method and Description |
|---|---|
| public void | setLoadOnStartup(int
the initialization priority of the Servlet loadOnStartup)Sets the |
| public void | setMultipartConfig(MultipartConfigElement
the multipartConfig)MultipartConfigElement to be applied to the patterns mapped to the registrationSets the |
| public void | setRunAsRole(String
the name of the roleName)runAs roleSets the name of the |
| public Set | Returns: the (possibly empty) Set of URL patterns that were already the exact target of asecurity-constraint that was established via the portable deployment descriptor. This method has no
effect on the patterns included in the returned setthe constraint)ServletSecurityElement to be applied to the patterns mapped to this ServletRegistrationSets the |
| setLoadOnStartup | back to summary |
|---|---|
| public void setLoadOnStartup(int loadOnStartup) 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 ServletContext, that is, after it has invoked all of the ServletContextListener objects
configured for the ServletContext 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) Sets the
| |
| setRunAsRole | back to summary |
|---|---|
| public void setRunAsRole(String roleName) Sets the name of the
| |
| setServletSecurity | back to summary |
|---|---|
| public Set 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
| |