Package org.apache.catalina.core
Class ApplicationServletRegistration
java.lang.Object
org.apache.catalina.core.ApplicationServletRegistration
- All Implemented Interfaces:
Registration,Registration.Dynamic,ServletRegistration,ServletRegistration.Dynamic
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.servlet.Registration
Registration.DynamicNested classes/interfaces inherited from interface javax.servlet.ServletRegistration
ServletRegistration.Dynamic -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMapping(String... urlPatterns) Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration.getInitParameter(String name) Get the value of an initialisation parameter.Get the names and values of all the initialisation parameters.Gets the currently available mappings of the Servlet represented by this ServletRegistration.getName()voidsetAsyncSupported(boolean asyncSupported) Mark this Servlet/Filter as supported asynchronous processing.booleansetInitParameter(String name, String value) Add an initialisation parameter if not already added.setInitParameters(Map<String, String> initParameters) Add multiple initialisation parameters.voidsetLoadOnStartup(int loadOnStartup) voidsetMultipartConfig(MultipartConfigElement multipartConfig) voidsetRunAsRole(String roleName) setServletSecurity(ServletSecurityElement constraint)
-
Constructor Details
-
ApplicationServletRegistration
-
-
Method Details
-
getClassName
- Specified by:
getClassNamein interfaceRegistration
-
getInitParameter
Description copied from interface:javax.servlet.RegistrationGet the value of an initialisation parameter.- Specified by:
getInitParameterin interfaceRegistration- Parameters:
name- The initialisation parameter whose value is required- Returns:
- The value of the named initialisation parameter
-
getInitParameters
Description copied from interface:javax.servlet.RegistrationGet the names and values of all the initialisation parameters.- Specified by:
getInitParametersin interfaceRegistration- Returns:
- A Map of initialisation parameter names and associated values keyed by name
-
getName
- Specified by:
getNamein interfaceRegistration
-
setInitParameter
Description copied from interface:javax.servlet.RegistrationAdd an initialisation parameter if not already added.- Specified by:
setInitParameterin interfaceRegistration- Parameters:
name- Name of initialisation parametervalue- Value of initialisation parameter- Returns:
trueif the initialisation parameter was set,falseif the initialisation parameter was not set because an initialisation parameter of the same name already existed
-
setInitParameters
Description copied from interface:javax.servlet.RegistrationAdd multiple initialisation parameters. If any of the supplied initialisation parameter conflicts with an existing initialisation parameter, no updates will be performed.- Specified by:
setInitParametersin interfaceRegistration- Parameters:
initParameters- The initialisation parameters to add- Returns:
- The set of initialisation parameter names that conflicted with existing initialisation parameter. If there are no conflicts, this Set will be empty.
-
setAsyncSupported
public void setAsyncSupported(boolean asyncSupported) Description copied from interface:javax.servlet.Registration.DynamicMark this Servlet/Filter as supported asynchronous processing.- Specified by:
setAsyncSupportedin interfaceRegistration.Dynamic- Parameters:
asyncSupported- Should this Servlet/Filter support asynchronous processing
-
setLoadOnStartup
public void setLoadOnStartup(int loadOnStartup) - Specified by:
setLoadOnStartupin interfaceServletRegistration.Dynamic
-
setMultipartConfig
- Specified by:
setMultipartConfigin interfaceServletRegistration.Dynamic
-
setRunAsRole
- Specified by:
setRunAsRolein interfaceServletRegistration.Dynamic
-
setServletSecurity
- Specified by:
setServletSecurityin interfaceServletRegistration.Dynamic
-
addMapping
Description copied from interface:javax.servlet.ServletRegistrationAdds 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.- Specified by:
addMappingin interfaceServletRegistration- Parameters:
urlPatterns- The URL patterns that this Servlet should be mapped to- Returns:
- the (possibly empty) Set of URL patterns that are already mapped to a different Servlet
-
getMappings
Description copied from interface:javax.servlet.ServletRegistrationGets the currently available mappings of the Servlet represented by this ServletRegistration. If permitted, any changes to the returned Collection must not affect this ServletRegistration.- Specified by:
getMappingsin interfaceServletRegistration- Returns:
- a (possibly empty) Collection of the currently available mappings of the Servlet represented by this ServletRegistration
-
getRunAsRole
- Specified by:
getRunAsRolein interfaceServletRegistration
-