| Modifier and Type | Class and Description |
|---|---|
| public static interface | ServletRegistration.
Interface through which a Servlet registered via one of the addServlet methods on ServletContext may be further configured. |
| 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 that this Servlet should be mapped to 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 ServletRegistration. |
| public String | Returns: the name of the user / group ornull if none has been specifiedObtain the name of the user / group under which the Servlet has been configured to run. |
| 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 ServletRegistration object, so changes in the returned set are not reflected in the ServletRegistration object, and vice-versa.
| |
| getMappings | back to summary |
|---|---|
| public Collection Gets the currently available mappings of the Servlet represented by this ServletRegistration. If permitted, any changes to the returned Collection must not affect this ServletRegistration.
| |
| getRunAsRole | back to summary |
|---|---|
| public String getRunAsRole() Obtain the name of the user / group under which the Servlet has been configured to run.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | setLoadOnStartup(int
The position in the order the Servlet should be started (higher numbers are started
after lower numbers) loadOnStartup)Set the loadOnStartup order for the Servlet |
| public void | setMultipartConfig(MultipartConfigElement
The configuration to associate with the Servlet multipartConfig)Set the multi-part configuration for the associated Servlet. |
| public void | setRunAsRole(String
name of the user / group or roleName)null if noneSet the name of the user / group under which the Servlet should be configured to run. |
| public Set | Returns: urls currently mapped to this registration that are already present in web.xmlnew security constraints for this Servlet constraint)Add security constraints to this Servlet. |
| setLoadOnStartup | back to summary |
|---|---|
| public void setLoadOnStartup(int loadOnStartup) Set the loadOnStartup order for the Servlet
| |
| setMultipartConfig | back to summary |
|---|---|
| public void setMultipartConfig(MultipartConfigElement multipartConfig) Set the multi-part configuration for the associated Servlet. To clear the multi-part configuration specify
| |
| setRunAsRole | back to summary |
|---|---|
| public void setRunAsRole(String roleName) Set the name of the user / group under which the Servlet should be configured to run.
| |
| setServletSecurity | back to summary |
|---|---|
| public Set Add security constraints to this Servlet.
| |