Class ServletDef

java.lang.Object
org.apache.tomcat.util.descriptor.web.ServletDef
All Implemented Interfaces:
Serializable

public class ServletDef extends Object implements Serializable
Representation of a servlet definition for a web application, as represented in a <servlet> element in the deployment descriptor.
See Also:
  • Constructor Details

    • ServletDef

      public ServletDef()
      Default constructor.
  • Method Details

    • getDescription

      public String getDescription()
      Returns the description of this servlet.
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Sets the description of this servlet.
      Parameters:
      description - the description
    • getDisplayName

      public String getDisplayName()
      Returns the display name of this servlet.
      Returns:
      the display name
    • setDisplayName

      public void setDisplayName(String displayName)
      Sets the display name of this servlet.
      Parameters:
      displayName - the display name
    • getSmallIcon

      public String getSmallIcon()
      Returns the small icon associated with this servlet.
      Returns:
      the small icon
    • setSmallIcon

      public void setSmallIcon(String smallIcon)
      Sets the small icon associated with this servlet.
      Parameters:
      smallIcon - the small icon
    • getLargeIcon

      public String getLargeIcon()
      Returns the large icon associated with this servlet.
      Returns:
      the large icon
    • setLargeIcon

      public void setLargeIcon(String largeIcon)
      Sets the large icon associated with this servlet.
      Parameters:
      largeIcon - the large icon
    • getServletName

      public String getServletName()
      Returns the name of this servlet.
      Returns:
      the servlet name
    • setServletName

      public void setServletName(String servletName)
      Sets the name of this servlet.
      Parameters:
      servletName - the servlet name
    • getServletClass

      public String getServletClass()
      Returns the fully qualified name of the Java class that implements this servlet.
      Returns:
      the servlet class
    • setServletClass

      public void setServletClass(String servletClass)
      Sets the fully qualified name of the Java class that implements this servlet.
      Parameters:
      servletClass - the servlet class
    • getJspFile

      public String getJspFile()
      Returns the name of the JSP file to which this servlet definition applies.
      Returns:
      the JSP file
    • setJspFile

      public void setJspFile(String jspFile)
      Sets the name of the JSP file to which this servlet definition applies.
      Parameters:
      jspFile - the JSP file
    • getParameterMap

      public Map<String,String> getParameterMap()
      Returns the set of initialization parameters for this servlet, keyed by parameter name.
      Returns:
      the parameter map
    • addInitParameter

      public void addInitParameter(String name, 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 Integer getLoadOnStartup()
      Returns the load-on-startup order for this servlet.
      Returns:
      the load-on-startup order
    • setLoadOnStartup

      public void setLoadOnStartup(String loadOnStartup)
      Sets the load-on-startup order for this servlet.
      Parameters:
      loadOnStartup - the load-on-startup order as a string
    • getRunAs

      public String getRunAs()
      Returns the run-as configuration for this servlet.
      Returns:
      the run-as role name
    • setRunAs

      public void setRunAs(String runAs)
      Sets the run-as configuration for this servlet.
      Parameters:
      runAs - the run-as role name
    • getSecurityRoleRefs

      public Set<SecurityRoleRef> getSecurityRoleRefs()
      Returns the set of security role references for this servlet.
      Returns:
      the security role references
    • 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()
      Returns the multipart configuration for this servlet.
      Returns:
      the multipart configuration
    • setMultipartDef

      public void setMultipartDef(MultipartDef multipartDef)
      Sets the multipart configuration for this servlet.
      Parameters:
      multipartDef - the multipart configuration
    • getAsyncSupported

      public Boolean getAsyncSupported()
      Returns whether this servlet supports async processing.
      Returns:
      whether async is supported
    • setAsyncSupported

      public void setAsyncSupported(String asyncSupported)
      Sets whether this servlet supports async processing.
      Parameters:
      asyncSupported - whether async is supported as a string
    • getEnabled

      public Boolean getEnabled()
      Returns whether this servlet is enabled.
      Returns:
      whether the servlet is enabled
    • setEnabled

      public void setEnabled(String enabled)
      Sets whether this servlet is enabled.
      Parameters:
      enabled - whether the servlet is enabled as a string
    • isOverridable

      public boolean isOverridable()
      Returns whether this ServletDef can be overridden by a Servlet Container Initializer.
      Returns:
      whether the servlet definition is overridable
    • setOverridable

      public void setOverridable(boolean overridable)
      Sets whether this ServletDef can be overridden by a Servlet Container Initializer.
      Parameters:
      overridable - whether the servlet definition is overridable