ServletDef (Apache Tomcat 9.0.71 API Documentation)

Package org.apache.tomcat.util.descriptor.web

## Class ServletDef

- java.lang.Object
- - org.apache.tomcat.util.descriptor.web.ServletDef

- All Implemented Interfaces:
    `java.io.Serializable`

      public class ServletDef
      extends java.lang.Object
      implements java.io.Serializable

  Representation of a servlet definition for a web application, as represented in a `<servlet>` element in the deployment descriptor.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServletDef()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addInitParameter​(java.lang.String name, java.lang.String value)` | Add an initialization parameter to the set of parameters associated with this servlet.
    `void` | `addSecurityRoleRef​(SecurityRoleRef securityRoleRef)` | Add a security-role-ref to the set of security-role-refs associated with this servlet.
    `java.lang.Boolean` | `getAsyncSupported()` |
    `java.lang.String` | `getDescription()` |
    `java.lang.String` | `getDisplayName()` |
    `java.lang.Boolean` | `getEnabled()` |
    `java.lang.String` | `getJspFile()` |
    `java.lang.String` | `getLargeIcon()` |
    `java.lang.Integer` | `getLoadOnStartup()` |
    `MultipartDef` | `getMultipartDef()` |
    `java.util.Map<java.lang.String,​java.lang.String>` | `getParameterMap()` |
    `java.lang.String` | `getRunAs()` |
    `java.util.Set<SecurityRoleRef>` | `getSecurityRoleRefs()` |
    `java.lang.String` | `getServletClass()` |
    `java.lang.String` | `getServletName()` |
    `java.lang.String` | `getSmallIcon()` |
    `boolean` | `isOverridable()` |
    `void` | `setAsyncSupported​(java.lang.String asyncSupported)` |
    `void` | `setDescription​(java.lang.String description)` |
    `void` | `setDisplayName​(java.lang.String displayName)` |
    `void` | `setEnabled​(java.lang.String enabled)` |
    `void` | `setJspFile​(java.lang.String jspFile)` |
    `void` | `setLargeIcon​(java.lang.String largeIcon)` |
    `void` | `setLoadOnStartup​(java.lang.String loadOnStartup)` |
    `void` | `setMultipartDef​(MultipartDef multipartDef)` |
    `void` | `setOverridable​(boolean overridable)` |
    `void` | `setRunAs​(java.lang.String runAs)` |
    `void` | `setServletClass​(java.lang.String servletClass)` |
    `void` | `setServletName​(java.lang.String servletName)` |
    `void` | `setSmallIcon​(java.lang.String smallIcon)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ServletDef

          public ServletDef()

  - ### Method Detail

    - #### getDescription

          public java.lang.String getDescription()

    - #### setDescription

          public void setDescription​(java.lang.String description)

    - #### getDisplayName

          public java.lang.String getDisplayName()

    - #### setDisplayName

          public void setDisplayName​(java.lang.String displayName)

    - #### getSmallIcon

          public java.lang.String getSmallIcon()

    - #### setSmallIcon

          public void setSmallIcon​(java.lang.String smallIcon)

    - #### getLargeIcon

          public java.lang.String getLargeIcon()

    - #### setLargeIcon

          public void setLargeIcon​(java.lang.String largeIcon)

    - #### getServletName

          public java.lang.String getServletName()

    - #### setServletName

          public void setServletName​(java.lang.String servletName)

    - #### getServletClass

          public java.lang.String getServletClass()

    - #### setServletClass

          public void setServletClass​(java.lang.String servletClass)

    - #### getJspFile

          public java.lang.String getJspFile()

    - #### setJspFile

          public void setJspFile​(java.lang.String jspFile)

    - #### getParameterMap

          public java.util.Map<java.lang.String,​java.lang.String> getParameterMap()

    - #### addInitParameter

          public void addInitParameter​(java.lang.String name,
                                       java.lang.String value)

      Add an initialization parameter to the set of parameters associated with this servlet.
      Parameters:
        `name` - The initialisation parameter name
        `value` - The initialisation parameter value

    - #### getLoadOnStartup

          public java.lang.Integer getLoadOnStartup()

    - #### setLoadOnStartup

          public void setLoadOnStartup​(java.lang.String loadOnStartup)

    - #### getRunAs

          public java.lang.String getRunAs()

    - #### setRunAs

          public void setRunAs​(java.lang.String runAs)

    - #### getSecurityRoleRefs

          public java.util.Set<SecurityRoleRef> getSecurityRoleRefs()

    - #### addSecurityRoleRef

          public void addSecurityRoleRef​(SecurityRoleRef securityRoleRef)

      Add a security-role-ref to the set of security-role-refs associated with this servlet.
      Parameters:
        `securityRoleRef` - The security role

    - #### getMultipartDef

          public MultipartDef getMultipartDef()

    - #### setMultipartDef

          public void setMultipartDef​(MultipartDef multipartDef)

    - #### getAsyncSupported

          public java.lang.Boolean getAsyncSupported()

    - #### setAsyncSupported

          public void setAsyncSupported​(java.lang.String asyncSupported)

    - #### getEnabled

          public java.lang.Boolean getEnabled()

    - #### setEnabled

          public void setEnabled​(java.lang.String enabled)

    - #### isOverridable

          public boolean isOverridable()

    - #### setOverridable

          public void setOverridable​(boolean overridable)