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.SerializableRepresentation 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()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInitParameter(java.lang.String name, java.lang.String value)Add an initialization parameter to the set of parameters associated with this servlet.voidaddSecurityRoleRef(SecurityRoleRef securityRoleRef)Add a security-role-ref to the set of security-role-refs associated with this servlet.java.lang.BooleangetAsyncSupported()Returns whether this servlet supports async processing.java.lang.StringgetDescription()Returns the description of this servlet.java.lang.StringgetDisplayName()Returns the display name of this servlet.java.lang.BooleangetEnabled()Returns whether this servlet is enabled.java.lang.StringgetJspFile()Returns the name of the JSP file to which this servlet definition applies.java.lang.StringgetLargeIcon()Returns the large icon associated with this servlet.java.lang.IntegergetLoadOnStartup()Returns the load-on-startup order for this servlet.MultipartDefgetMultipartDef()Returns the multipart configuration for this servlet.java.util.Map<java.lang.String,java.lang.String>getParameterMap()Returns the set of initialization parameters for this servlet, keyed by parameter name.java.lang.StringgetRunAs()Returns the run-as configuration for this servlet.java.util.Set<SecurityRoleRef>getSecurityRoleRefs()Returns the set of security role references for this servlet.java.lang.StringgetServletClass()Returns the fully qualified name of the Java class that implements this servlet.java.lang.StringgetServletName()Returns the name of this servlet.java.lang.StringgetSmallIcon()Returns the small icon associated with this servlet.booleanisOverridable()Returns whether this ServletDef can be overridden by a Servlet Container Initializer.voidsetAsyncSupported(java.lang.String asyncSupported)Sets whether this servlet supports async processing.voidsetDescription(java.lang.String description)Sets the description of this servlet.voidsetDisplayName(java.lang.String displayName)Sets the display name of this servlet.voidsetEnabled(java.lang.String enabled)Sets whether this servlet is enabled.voidsetJspFile(java.lang.String jspFile)Sets the name of the JSP file to which this servlet definition applies.voidsetLargeIcon(java.lang.String largeIcon)Sets the large icon associated with this servlet.voidsetLoadOnStartup(java.lang.String loadOnStartup)Sets the load-on-startup order for this servlet.voidsetMultipartDef(MultipartDef multipartDef)Sets the multipart configuration for this servlet.voidsetOverridable(boolean overridable)Sets whether this ServletDef can be overridden by a Servlet Container Initializer.voidsetRunAs(java.lang.String runAs)Sets the run-as configuration for this servlet.voidsetServletClass(java.lang.String servletClass)Sets the fully qualified name of the Java class that implements this servlet.voidsetServletName(java.lang.String servletName)Sets the name of this servlet.voidsetSmallIcon(java.lang.String smallIcon)Sets the small icon associated with this servlet.
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Returns the description of this servlet.- Returns:
- the description
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of this servlet.- Parameters:
description- the description
-
getDisplayName
public java.lang.String getDisplayName()
Returns the display name of this servlet.- Returns:
- the display name
-
setDisplayName
public void setDisplayName(java.lang.String displayName)
Sets the display name of this servlet.- Parameters:
displayName- the display name
-
getSmallIcon
public java.lang.String getSmallIcon()
Returns the small icon associated with this servlet.- Returns:
- the small icon
-
setSmallIcon
public void setSmallIcon(java.lang.String smallIcon)
Sets the small icon associated with this servlet.- Parameters:
smallIcon- the small icon
-
getLargeIcon
public java.lang.String getLargeIcon()
Returns the large icon associated with this servlet.- Returns:
- the large icon
-
setLargeIcon
public void setLargeIcon(java.lang.String largeIcon)
Sets the large icon associated with this servlet.- Parameters:
largeIcon- the large icon
-
getServletName
public java.lang.String getServletName()
Returns the name of this servlet.- Returns:
- the servlet name
-
setServletName
public void setServletName(java.lang.String servletName)
Sets the name of this servlet.- Parameters:
servletName- the servlet name
-
getServletClass
public java.lang.String getServletClass()
Returns the fully qualified name of the Java class that implements this servlet.- Returns:
- the servlet class
-
setServletClass
public void setServletClass(java.lang.String servletClass)
Sets the fully qualified name of the Java class that implements this servlet.- Parameters:
servletClass- the servlet class
-
getJspFile
public java.lang.String getJspFile()
Returns the name of the JSP file to which this servlet definition applies.- Returns:
- the JSP file
-
setJspFile
public void setJspFile(java.lang.String jspFile)
Sets the name of the JSP file to which this servlet definition applies.- Parameters:
jspFile- the JSP file
-
getParameterMap
public java.util.Map<java.lang.String,java.lang.String> getParameterMap()
Returns the set of initialization parameters for this servlet, keyed by parameter name.- Returns:
- the parameter map
-
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 namevalue- The initialisation parameter value
-
getLoadOnStartup
public java.lang.Integer getLoadOnStartup()
Returns the load-on-startup order for this servlet.- Returns:
- the load-on-startup order
-
setLoadOnStartup
public void setLoadOnStartup(java.lang.String loadOnStartup)
Sets the load-on-startup order for this servlet.- Parameters:
loadOnStartup- the load-on-startup order as a string
-
getRunAs
public java.lang.String getRunAs()
Returns the run-as configuration for this servlet.- Returns:
- the run-as role name
-
setRunAs
public void setRunAs(java.lang.String runAs)
Sets the run-as configuration for this servlet.- Parameters:
runAs- the run-as role name
-
getSecurityRoleRefs
public java.util.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 java.lang.Boolean getAsyncSupported()
Returns whether this servlet supports async processing.- Returns:
- whether async is supported
-
setAsyncSupported
public void setAsyncSupported(java.lang.String asyncSupported)
Sets whether this servlet supports async processing.- Parameters:
asyncSupported- whether async is supported as a string
-
getEnabled
public java.lang.Boolean getEnabled()
Returns whether this servlet is enabled.- Returns:
- whether the servlet is enabled
-
setEnabled
public void setEnabled(java.lang.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
-
-