Class ServletDef
java.lang.Object
org.apache.tomcat.util.descriptor.web.ServletDef
- All Implemented Interfaces:
Serializable
Representation of a servlet definition for a web application, as represented in a
<servlet>
element in the deployment descriptor.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInitParameter(String name, 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.Returns whether this servlet supports async processing.Returns the description of this servlet.Returns the display name of this servlet.Returns whether this servlet is enabled.Returns the name of the JSP file to which this servlet definition applies.Returns the large icon associated with this servlet.Returns the load-on-startup order for this servlet.Returns the multipart configuration for this servlet.Returns the set of initialization parameters for this servlet, keyed by parameter name.getRunAs()Returns the run-as configuration for this servlet.Returns the set of security role references for this servlet.Returns the fully qualified name of the Java class that implements this servlet.Returns the name of this servlet.Returns the small icon associated with this servlet.booleanReturns whether this ServletDef can be overridden by a Servlet Container Initializer.voidsetAsyncSupported(String asyncSupported) Sets whether this servlet supports async processing.voidsetDescription(String description) Sets the description of this servlet.voidsetDisplayName(String displayName) Sets the display name of this servlet.voidsetEnabled(String enabled) Sets whether this servlet is enabled.voidsetJspFile(String jspFile) Sets the name of the JSP file to which this servlet definition applies.voidsetLargeIcon(String largeIcon) Sets the large icon associated with this servlet.voidsetLoadOnStartup(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.voidSets the run-as configuration for this servlet.voidsetServletClass(String servletClass) Sets the fully qualified name of the Java class that implements this servlet.voidsetServletName(String servletName) Sets the name of this servlet.voidsetSmallIcon(String smallIcon) Sets the small icon associated with this servlet.
-
Constructor Details
-
ServletDef
public ServletDef()Default constructor.
-
-
Method Details
-
getDescription
-
setDescription
Sets the description of this servlet.- Parameters:
description- the description
-
getDisplayName
-
setDisplayName
Sets the display name of this servlet.- Parameters:
displayName- the display name
-
getSmallIcon
Returns the small icon associated with this servlet.- Returns:
- the small icon
-
setSmallIcon
Sets the small icon associated with this servlet.- Parameters:
smallIcon- the small icon
-
getLargeIcon
Returns the large icon associated with this servlet.- Returns:
- the large icon
-
setLargeIcon
Sets the large icon associated with this servlet.- Parameters:
largeIcon- the large icon
-
getServletName
-
setServletName
Sets the name of this servlet.- Parameters:
servletName- the servlet name
-
getServletClass
Returns the fully qualified name of the Java class that implements this servlet.- Returns:
- the servlet class
-
setServletClass
Sets the fully qualified name of the Java class that implements this servlet.- Parameters:
servletClass- the servlet class
-
getJspFile
Returns the name of the JSP file to which this servlet definition applies.- Returns:
- the JSP file
-
setJspFile
Sets the name of the JSP file to which this servlet definition applies.- Parameters:
jspFile- the JSP file
-
getParameterMap
-
addInitParameter
-
getLoadOnStartup
Returns the load-on-startup order for this servlet.- Returns:
- the load-on-startup order
-
setLoadOnStartup
Sets the load-on-startup order for this servlet.- Parameters:
loadOnStartup- the load-on-startup order as a string
-
getRunAs
Returns the run-as configuration for this servlet.- Returns:
- the run-as role name
-
setRunAs
Sets the run-as configuration for this servlet.- Parameters:
runAs- the run-as role name
-
getSecurityRoleRefs
Returns the set of security role references for this servlet.- Returns:
- the security role references
-
addSecurityRoleRef
Add a security-role-ref to the set of security-role-refs associated with this servlet.- Parameters:
securityRoleRef- The security role
-
getMultipartDef
Returns the multipart configuration for this servlet.- Returns:
- the multipart configuration
-
setMultipartDef
Sets the multipart configuration for this servlet.- Parameters:
multipartDef- the multipart configuration
-
getAsyncSupported
Returns whether this servlet supports async processing.- Returns:
- whether async is supported
-
setAsyncSupported
Sets whether this servlet supports async processing.- Parameters:
asyncSupported- whether async is supported as a string
-
getEnabled
Returns whether this servlet is enabled.- Returns:
- whether the servlet is enabled
-
setEnabled
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
-