Top Fields Constructors Methods
org.apache.catalina.core

public Class ApplicationServletRegistration

extends Object
implements Dynamic
Class Inheritance
All Implemented Interfaces
jakarta.servlet.ServletRegistration.Dynamic, jakarta.servlet.Registration.Dynamic, jakarta.servlet.Registration, jakarta.servlet.ServletRegistration
Imports
java.nio.charset.StandardCharsets, java.util.Collection, .Collections, .HashSet, .Map, .Set, jakarta.servlet.MultipartConfigElement, .ServletRegistration, .ServletSecurityElement, org.apache.catalina.Context, .LifecycleState, .Wrapper, org.apache.catalina.util.ParameterMap, org.apache.tomcat.util.buf.UDecoder, org.apache.tomcat.util.res.StringManager

Field Summary

Modifier and TypeField and Description
private ServletSecurityElement
private final Context
private static final StringManager
sm

The string manager for this package.

private final Wrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Set<String>
addMapping(String...
The URL patterns that this Servlet should be mapped to
urlPatterns
)

Implements jakarta.servlet.ServletRegistration.addMapping.

Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration.

public String
getClassName()

Implements jakarta.servlet.Registration.getClassName.

Obtain the name of the implementation class for the Servlet.

public String
getInitParameter(String
The initialisation parameter whose value is required
name
)

Implements jakarta.servlet.Registration.getInitParameter.

Get the value of an initialisation parameter.

public Map<String, String>
getInitParameters()

Implements jakarta.servlet.Registration.getInitParameters.

Get the names and values of all the initialisation parameters.

public Collection<String>
getMappings()

Implements jakarta.servlet.ServletRegistration.getMappings.

Gets the currently available mappings of the Servlet represented by this ServletRegistration.

public String
getName()

Implements jakarta.servlet.Registration.getName.

Obtain the name of the Servlet.

public String
getRunAsRole()

Implements jakarta.servlet.ServletRegistration.getRunAsRole.

Obtain the name of the user / group under which the Servlet has been configured to run.

public void
setAsyncSupported(boolean
Should this Servlet/Filter support asynchronous processing
asyncSupported
)

Implements jakarta.servlet.Registration.Dynamic.setAsyncSupported.

Mark this Servlet/Filter as supported asynchronous processing.

public boolean
setInitParameter(String
Name of initialisation parameter
name
,
String
Value of initialisation parameter
value
)

Implements jakarta.servlet.Registration.setInitParameter.

Add an initialisation parameter if not already added.

public Set<String>
setInitParameters(Map<String, String>
The initialisation parameters to add
initParameters
)

Implements jakarta.servlet.Registration.setInitParameters.

Add multiple initialisation parameters.

public void
setLoadOnStartup(int
The position in the order the Servlet should be started (higher numbers are started after lower numbers)
loadOnStartup
)

Implements jakarta.servlet.ServletRegistration.Dynamic.setLoadOnStartup.

Set the loadOnStartup order for the Servlet

public void
setMultipartConfig(MultipartConfigElement
The configuration to associate with the Servlet
multipartConfig
)

Implements jakarta.servlet.ServletRegistration.Dynamic.setMultipartConfig.

Set the multi-part configuration for the associated Servlet.

public void
setRunAsRole(String
name of the user / group or null if none
roleName
)

Implements jakarta.servlet.ServletRegistration.Dynamic.setRunAsRole.

Set the name of the user / group under which the Servlet should be configured to run.

public Set<String>
setServletSecurity(ServletSecurityElement
new security constraints for this Servlet
constraint
)

Implements jakarta.servlet.ServletRegistration.Dynamic.setServletSecurity.

Add security constraints to this Servlet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constraintback to summary
private ServletSecurityElement constraint
contextback to summary
private final Context context
smback to summary
private static final StringManager sm

The string manager for this package.

wrapperback to summary
private final Wrapper wrapper

Constructor Detail

ApplicationServletRegistrationback to summary
public ApplicationServletRegistration(Wrapper wrapper, Context context)

Method Detail

addMappingback to summary
public Set<String> addMapping(String... urlPatterns)

Implements jakarta.servlet.ServletRegistration.addMapping.

Doc from jakarta.servlet.ServletRegistration.addMapping.

Adds 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.

Parameters
urlPatterns:String[]

The URL patterns that this Servlet should be mapped to

Returns:Set<String>

the (possibly empty) Set of URL patterns that are already mapped to a different Servlet

Annotations
@Override
getClassNameback to summary
public String getClassName()

Implements jakarta.servlet.Registration.getClassName.

Doc from jakarta.servlet.Registration.getClassName.

Obtain the name of the implementation class for the Servlet.

Returns:String

the name of the implementation class for the Servlet.

Annotations
@Override
getInitParameterback to summary
public String getInitParameter(String name)

Implements jakarta.servlet.Registration.getInitParameter.

Doc from jakarta.servlet.Registration.getInitParameter.

Get the value of an initialisation parameter.

Parameters
name:String

The initialisation parameter whose value is required

Returns:String

The value of the named initialisation parameter

Annotations
@Override
getInitParametersback to summary
public Map<String, String> getInitParameters()

Implements jakarta.servlet.Registration.getInitParameters.

Doc from jakarta.servlet.Registration.getInitParameters.

Get the names and values of all the initialisation parameters.

Returns:Map<String, String>

A Map of initialisation parameter names and associated values keyed by name

Annotations
@Override
getMappingsback to summary
public Collection<String> getMappings()

Implements jakarta.servlet.ServletRegistration.getMappings.

Doc from jakarta.servlet.ServletRegistration.getMappings.

Gets the currently available mappings of the Servlet represented by this ServletRegistration. If permitted, any changes to the returned Collection must not affect this ServletRegistration.

Returns:Collection<String>

a (possibly empty) Collection of the currently available mappings of the Servlet represented by this ServletRegistration

Annotations
@Override
getNameback to summary
public String getName()

Implements jakarta.servlet.Registration.getName.

Doc from jakarta.servlet.Registration.getName.

Obtain the name of the Servlet.

Returns:String

the name of the Servlet.

Annotations
@Override
getRunAsRoleback to summary
public String getRunAsRole()

Implements jakarta.servlet.ServletRegistration.getRunAsRole.

Doc from jakarta.servlet.ServletRegistration.getRunAsRole.

Obtain the name of the user / group under which the Servlet has been configured to run.

Returns:String

the name of the user / group or null if none has been specified

Annotations
@Override
setAsyncSupportedback to summary
public void setAsyncSupported(boolean asyncSupported)

Implements jakarta.servlet.Registration.Dynamic.setAsyncSupported.

Doc from jakarta.servlet.Registration.Dynamic.setAsyncSupported.

Mark this Servlet/Filter as supported asynchronous processing.

Parameters
asyncSupported:boolean

Should this Servlet/Filter support asynchronous processing

Annotations
@Override
setInitParameterback to summary
public boolean setInitParameter(String name, String value)

Implements jakarta.servlet.Registration.setInitParameter.

Doc from jakarta.servlet.Registration.setInitParameter.

Add an initialisation parameter if not already added.

Parameters
name:String

Name of initialisation parameter

value:String

Value of initialisation parameter

Returns:boolean

true if the initialisation parameter was set, false if the initialisation parameter was not set because an initialisation parameter of the same name already existed

Annotations
@Override
setInitParametersback to summary
public Set<String> setInitParameters(Map<String, String> initParameters)

Implements jakarta.servlet.Registration.setInitParameters.

Doc from jakarta.servlet.Registration.setInitParameters.

Add multiple initialisation parameters. If any of the supplied initialisation parameter conflicts with an existing initialisation parameter, no updates will be performed.

Parameters
initParameters:Map<String, String>

The initialisation parameters to add

Returns:Set<String>

The set of initialisation parameter names that conflicted with existing initialisation parameter. If there are no conflicts, this Set will be empty.

Annotations
@Override
setLoadOnStartupback to summary
public void setLoadOnStartup(int loadOnStartup)

Implements jakarta.servlet.ServletRegistration.Dynamic.setLoadOnStartup.

Doc from jakarta.servlet.ServletRegistration.Dynamic.setLoadOnStartup.

Set the loadOnStartup order for the Servlet

Parameters
loadOnStartup:int

The position in the order the Servlet should be started (higher numbers are started after lower numbers)

Annotations
@Override
setMultipartConfigback to summary
public void setMultipartConfig(MultipartConfigElement multipartConfig)

Implements jakarta.servlet.ServletRegistration.Dynamic.setMultipartConfig.

Doc from jakarta.servlet.ServletRegistration.Dynamic.setMultipartConfig.

Set the multi-part configuration for the associated Servlet. To clear the multi-part configuration specify null as the new value.

Parameters
multipartConfig:MultipartConfigElement

The configuration to associate with the Servlet

Annotations
@Override
setRunAsRoleback to summary
public void setRunAsRole(String roleName)

Implements jakarta.servlet.ServletRegistration.Dynamic.setRunAsRole.

Doc from jakarta.servlet.ServletRegistration.Dynamic.setRunAsRole.

Set the name of the user / group under which the Servlet should be configured to run.

Parameters
roleName:String

name of the user / group or null if none

Annotations
@Override
setServletSecurityback to summary
public Set<String> setServletSecurity(ServletSecurityElement constraint)

Implements jakarta.servlet.ServletRegistration.Dynamic.setServletSecurity.

Doc from jakarta.servlet.ServletRegistration.Dynamic.setServletSecurity.

Add security constraints to this Servlet.

Parameters
constraint:ServletSecurityElement

new security constraints for this Servlet

Returns:Set<String>

urls currently mapped to this registration that are already present in web.xml

Annotations
@Override