Top Description Fields Constructors Methods
org.apache.catalina.startup

public Class FailedContext

extends LifecycleMBeanBase
implements Context
Class Inheritance
All Implemented Interfaces
org.apache.catalina.Context, org.apache.tomcat.ContextBind, org.apache.catalina.Container, org.apache.catalina.Lifecycle
Imports
java.beans.PropertyChangeListener, java.io.File, java.net.URL, java.util.Locale, .Map, .Set, jakarta.servlet.ServletContainerInitializer, .ServletContext, .ServletRegistration, .ServletRequest, .ServletSecurityElement, jakarta.servlet.descriptor.JspConfigDescriptor, org.apache.catalina.AccessLog, .Authenticator, .Cluster, .Container, .ContainerListener, .Context, .Engine, .Host, .LifecycleException, .Loader, .Manager, .Pipeline, .Realm, .ThreadBindingListener, .Valve, .WebResourceRoot, .Wrapper, org.apache.catalina.connector.Request, .Response, org.apache.catalina.deploy.NamingResourcesImpl, org.apache.catalina.util.ContextName, .LifecycleMBeanBase, org.apache.juli.logging.Log, org.apache.tomcat.InstanceManager, .JarScanner, org.apache.tomcat.util.descriptor.web.ApplicationParameter, .ErrorPage, .FilterDef, .FilterMap, .LoginConfig, .SecurityConstraint, org.apache.tomcat.util.http.CookieProcessor, org.apache.tomcat.util.res.StringManager

An implementation of Context that is used as a place-holder for deployed applications when their deployment fails and a Context instance (usually org.apache.catalina.core.StandardContext but may be any Context implementation) cannot be created.

Field Summary

Modifier and TypeField and Description
private URL
private String
private String
private Container
private String
protected static final StringManager
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addApplicationListener(String
Java class name of a listener class
listener
)

Implements org.apache.catalina.Context.addApplicationListener.

Add a new Listener class name to the set of Listeners configured for this application.

public void
addApplicationParameter(ApplicationParameter
The new application parameter
parameter
)

Implements org.apache.catalina.Context.addApplicationParameter.

Add a new application parameter for this application.

public void
addChild(Container
New child Container to be added
child
)

Implements org.apache.catalina.Container.addChild.

Add a new child Container to those associated with this Container, if supported.

public void
addConstraint(SecurityConstraint
The security constraint that should be added
constraint
)

Implements org.apache.catalina.Context.addConstraint.

Add a security constraint to the set for this web application.

public void
addContainerListener(ContainerListener
The listener to add
listener
)

Implements org.apache.catalina.Container.addContainerListener.

Add a container event listener to this component.

public void
addErrorPage(ErrorPage
The error page definition to be added
errorPage
)

Implements org.apache.catalina.Context.addErrorPage.

Add an error page for the specified error or Java exception.

public void
addFilterDef(FilterDef
The filter definition to be added
filterDef
)

Implements org.apache.catalina.Context.addFilterDef.

Add a filter definition to this Context.

public void
addFilterMap(FilterMap
The filter mapping to be added
filterMap
)

Implements org.apache.catalina.Context.addFilterMap.

Add a filter mapping to this Context.

public void
addFilterMapBefore(FilterMap
The filter mapping to be added
filterMap
)

Implements org.apache.catalina.Context.addFilterMapBefore.

Add a filter mapping to this Context before the mappings defined in the deployment descriptor but after any other mappings added via this method.

public void
addLocaleEncodingMappingParameter(String
locale to map an encoding for
locale
,
String
encoding to be used for a give locale
encoding
)

Implements org.apache.catalina.Context.addLocaleEncodingMappingParameter.

Add a Locale Encoding Mapping (see Sec 5.4 of Servlet spec 2.4)

public void
addMimeMapping(String
Filename extension being mapped
extension
,
String
Corresponding MIME type
mimeType
)

Implements org.apache.catalina.Context.addMimeMapping.

Add a new MIME mapping, replacing any existing mapping for the specified extension.

public void
addParameter(String
Name of the new parameter
name
,
String
Value of the new parameter
value
)

Implements org.apache.catalina.Context.addParameter.

Add a new context initialization parameter, replacing any existing value for the specified name.

public void
addPostConstructMethod(String
Fully qualified class name
clazz
,
String
Post construct method name
method
)

Implements org.apache.catalina.Context.addPostConstructMethod.

Add a post construct method definition for the given class, if there is an existing definition for the specified class - IllegalArgumentException will be thrown.

public void
addPreDestroyMethod(String
Fully qualified class name
clazz
,
String
Post construct method name
method
)

Implements org.apache.catalina.Context.addPreDestroyMethod.

Add a pre destroy method definition for the given class, if there is an existing definition for the specified class - IllegalArgumentException will be thrown.

public void
addPropertyChangeListener(PropertyChangeListener
The listener to add
listener
)

Implements org.apache.catalina.Container.addPropertyChangeListener.

Add a property change listener to this component.

public void
addRoleMapping(String
Security role used in the application
role
,
String
Actual security role to check for
link
)

Implements org.apache.catalina.Context.addRoleMapping.

Add a security role reference for this web application.

public void
addSecurityRole(String
New security role
role
)

Implements org.apache.catalina.Context.addSecurityRole.

Add a new security role for this web application.

public void
addServletContainerInitializer(ServletContainerInitializer
The instance to add
sci
,
Set<Class<?>>
The classes in which the initializer expressed an interest
classes
)

Implements org.apache.catalina.Context.addServletContainerInitializer.

Add a ServletContainerInitializer instance to this web application.

public void
addServletMappingDecoded(String
URL pattern to be mapped
pattern
,
String
Name of the corresponding servlet to execute
name
,
boolean
true if name identifies the JspServlet and pattern contains a wildcard; false otherwise
jspWildcard
)

Implements org.apache.catalina.Context.addServletMappingDecoded.

Add a new servlet mapping, replacing any existing mapping for the specified pattern.

public Set<String>
addServletSecurity(ServletRegistration.Dynamic
Servlet security was modified for
registration
,
ServletSecurityElement
new security constraints for this Servlet
servletSecurityElement
)

Implements org.apache.catalina.Context.addServletSecurity.

Notification that Servlet security has been dynamically set in a jakarta.servlet.ServletRegistration.Dynamic

public synchronized void
addValve(Valve valve)

public void
addWatchedResource(String
Path to the resource, relative to docBase
name
)

Implements org.apache.catalina.Context.addWatchedResource.

Add a resource which will be watched for reloading by the host auto deployer.

public void
addWelcomeFile(String
New welcome file name
name
)

Implements org.apache.catalina.Context.addWelcomeFile.

Add a new welcome file to the set recognized by this Context.

public void
addWrapperLifecycle(String
Java class name of a LifecycleListener class
listener
)

Implements org.apache.catalina.Context.addWrapperLifecycle.

Add the classname of a LifecycleListener to be added to each Wrapper appended to this Context.

public void
addWrapperListener(String
Java class name of a ContainerListener class
listener
)

Implements org.apache.catalina.Context.addWrapperListener.

Add the classname of a ContainerListener to be added to each Wrapper appended to this Context.

public void
backgroundProcess()

Implements org.apache.catalina.Container.backgroundProcess.

Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container.

public ClassLoader
bind(boolean
Should a java.security.PrivilegedAction be used when obtaining the current thread context class loader and setting the new one?
usePrivilegedAction
,
ClassLoader
The current class loader if known to save this method having to look it up
originalClassLoader
)

Implements org.apache.tomcat.ContextBind.bind.

Change the current thread context class loader to the web application class loader.

public InstanceManager
createInstanceManager()

Implements org.apache.catalina.Context.createInstanceManager.

Factory method to create and return a new InstanceManager instance.

public Wrapper
createWrapper()

Implements org.apache.catalina.Context.createWrapper.

Factory method to create and return a new Wrapper instance, of the Java implementation class appropriate for this Context implementation.

public void
public String[]
public ApplicationParameter[]
public Container
findChild(String
Name of the child Container to be retrieved
name
)

Implements org.apache.catalina.Container.findChild.

Obtain a child Container by name.

public Container[]
findChildren()

Implements org.apache.catalina.Container.findChildren.

Obtain the child Containers associated with this Container.

public SecurityConstraint[]
public ContainerListener[]
findContainerListeners()

Implements org.apache.catalina.Container.findContainerListeners.

Obtain the container listeners associated with this Container.

public ErrorPage
findErrorPage(int
Error code to look up
errorCode
)

Implements org.apache.catalina.Context.findErrorPage.

public ErrorPage
findErrorPage(Throwable
The exception type for which to find an ErrorPage
throwable
)

Implements org.apache.catalina.Context.findErrorPage.

Find and return the ErrorPage instance for the specified exception's class, or an ErrorPage instance for the closest superclass for which there is such a definition.

public ErrorPage[]
public FilterDef
findFilterDef(String
Filter name to look up
filterName
)

Implements org.apache.catalina.Context.findFilterDef.

public FilterDef[]
public FilterMap[]
public String
findMimeMapping(String
Extension to map to a MIME type
extension
)

Implements org.apache.catalina.Context.findMimeMapping.

public String[]
public String
findParameter(String
Name of the parameter to return
name
)

Implements org.apache.catalina.Context.findParameter.

public String[]
public String
findPostConstructMethod(String
Fully qualified class name
clazz
)

Implements org.apache.catalina.Context.findPostConstructMethod.

Returns the method name that is specified as post construct method for the given class, if it exists; otherwise NULL will be returned.

public Map<String, String>
findPostConstructMethods()

Implements org.apache.catalina.Context.findPostConstructMethods.

Returns a map with keys - fully qualified class names of the classes that have post construct methods and the values are the corresponding method names.

public String
findPreDestroyMethod(String
Fully qualified class name
clazz
)

Implements org.apache.catalina.Context.findPreDestroyMethod.

Returns the method name that is specified as pre destroy method for the given class, if it exists; otherwise NULL will be returned.

public Map<String, String>
findPreDestroyMethods()

Implements org.apache.catalina.Context.findPreDestroyMethods.

Returns a map with keys - fully qualified class names of the classes that have pre destroy methods and the values are the corresponding method names.

public String
findRoleMapping(String
Security role to map
role
)

Implements org.apache.catalina.Context.findRoleMapping.

For the given security role (as used by an application), return the corresponding role name (as defined by the underlying Realm) if there is one.

public boolean
public String[]
public String
findServletMapping(String
Pattern for which a mapping is requested
pattern
)

Implements org.apache.catalina.Context.findServletMapping.

public String[]
public String[]
public boolean
public String[]
public String[]
public String[]
public void
fireContainerEvent(String
Event type
type
,
Object
Event data
data
)

Implements org.apache.catalina.Container.fireContainerEvent.

Notify all container event listeners that a particular event has occurred for this Container.

public boolean
fireRequestDestroyEvent(ServletRequest
The request object that will be passed to the listener
request
)

Implements org.apache.catalina.Context.fireRequestDestroyEvent.

Notify all jakarta.servlet.ServletRequestListeners that a request has ended.

public boolean
fireRequestInitEvent(ServletRequest
The request object that will be passed to the listener
request
)

Implements org.apache.catalina.Context.fireRequestInitEvent.

Notify all jakarta.servlet.ServletRequestListeners that a request has started.

public AccessLog
getAccessLog()

Implements org.apache.catalina.Container.getAccessLog.

Obtain the AccessLog to use to log a request/response that is destined for this container.

public boolean
public boolean
getAllowCasualMultipartParsing()

Implements org.apache.catalina.Context.getAllowCasualMultipartParsing.

Returns true if requests mapped to servlets without "multipart config" to parse multipart/form-data requests anyway.

public boolean
public String
getAltDDName()

Implements org.apache.catalina.Context.getAltDDName.

Return the alternate Deployment Descriptor name.

public boolean
getAlwaysAccessSession()

Implements org.apache.catalina.Context.getAlwaysAccessSession.

If this is true, every request that is associated with a session will cause the session's last accessed time to be updated regardless of whether or not the request explicitly accesses the session.

public Object[]
getApplicationEventListeners()

Implements org.apache.catalina.Context.getApplicationEventListeners.

Obtain the registered application event listeners.

public Object[]
getApplicationLifecycleListeners()

Implements org.apache.catalina.Context.getApplicationLifecycleListeners.

Obtain the registered application lifecycle listeners.

public Authenticator
public int
getBackgroundProcessorDelay()

Implements org.apache.catalina.Container.getBackgroundProcessorDelay.

Get the delay between the invocation of the backgroundProcess method on this container and its children.

public String
public File
getCatalinaBase()

Implements org.apache.catalina.Container.getCatalinaBase.

Obtain the location of CATALINA_BASE.

public File
getCatalinaHome()

Implements org.apache.catalina.Container.getCatalinaHome.

Obtain the location of CATALINA_HOME.

public String
getCharset(Locale
The locale for which the mapped character set should be returned
locale
)

Implements org.apache.catalina.Context.getCharset.

Obtain the character set name to use with the given Locale.

public Cluster
getCluster()

Implements org.apache.catalina.Container.getCluster.

Get the Cluster for this container.

public URL
getConfigFile()

Implements org.apache.catalina.Context.getConfigFile.

Return the URL of the XML descriptor for this context.

public boolean
getConfigured()

Implements org.apache.catalina.Context.getConfigured.

Return the "correctly configured" flag for this Context.

public String
getContainerSciFilter()

Implements org.apache.catalina.Context.getContainerSciFilter.

Obtains the regular expression that specifies which container provided SCIs should be filtered out and not used for this context.

public boolean
getContextGetResourceRequiresSlash()

Implements org.apache.catalina.Context.getContextGetResourceRequiresSlash.

If this is true then the path passed to ServletContext.getResource() or ServletContext.getResourceAsStream() must start with "/".

public CookieProcessor
public boolean
getCookies()

Implements org.apache.catalina.Context.getCookies.

Return the "use cookies for session ids" flag.

public boolean
getCreateUploadTargets()

Implements org.apache.catalina.Context.getCreateUploadTargets.

Will Tomcat attempt to create an upload target used by this web application if it does not exist when the web application attempts to use it?

public boolean
getCrossContext()

Implements org.apache.catalina.Context.getCrossContext.

Return the "allow crossing servlet contexts" flag.

public boolean
getDenyUncoveredHttpMethods()

Implements org.apache.catalina.Context.getDenyUncoveredHttpMethods.

Return the deny-uncovered-http-methods flag for this web application.

public boolean
getDispatchersUseEncodedPaths()

Implements org.apache.catalina.Context.getDispatchersUseEncodedPaths.

Are paths used in calls to obtain a request dispatcher expected to be encoded?

public boolean
getDispatcherWrapsSameObject()

Implements org.apache.catalina.Context.getDispatcherWrapsSameObject.

If this is true then any wrapped request or response object passed to an application dispatcher will be checked to ensure that it has wrapped the original request or response.

public String
getDisplayName()

Implements org.apache.catalina.Context.getDisplayName.

Return the display name of this web application.

public boolean
getDistributable()

Implements org.apache.catalina.Context.getDistributable.

Get the distributable flag for this web application.

public String
getDocBase()

Implements org.apache.catalina.Context.getDocBase.

Obtain the document root for this Context.

protected String
getDomainInternal()

Implements abstract org.apache.catalina.util.LifecycleMBeanBase.getDomainInternal.

Method implemented by sub-classes to identify the domain in which MBeans should be registered.

public int
public int
public String
getEncodedPath()

Implements org.apache.catalina.Context.getEncodedPath.

Return the URL encoded context path

public boolean
public boolean
getIgnoreAnnotations()

Implements org.apache.catalina.Context.getIgnoreAnnotations.

Determine if annotations parsing is currently disabled

public InstanceManager
public JarScanner
getJarScanner()

Implements org.apache.catalina.Context.getJarScanner.

Get the Jar Scanner to be used to scan for JAR resources for this context.

public JspConfigDescriptor
public Loader
public boolean
getLogEffectiveWebXml()

Implements org.apache.catalina.Context.getLogEffectiveWebXml.

Should the effective web.xml for this context be logged on context start?

public Log
getLogger()

Implements org.apache.catalina.Container.getLogger.

Obtain the log to which events for this container should be logged.

public LoginConfig
public String
getLogName()

Implements org.apache.catalina.Container.getLogName.

Return the logger name that the container will use.

public Manager
public boolean
getMapperContextRootRedirectEnabled()

Implements org.apache.catalina.Context.getMapperContextRootRedirectEnabled.

Determines if requests for a web application context root will be redirected (adding a trailing slash) by the Mapper.

public boolean
getMapperDirectoryRedirectEnabled()

Implements org.apache.catalina.Context.getMapperDirectoryRedirectEnabled.

Determines if requests for a directory will be redirected (adding a trailing slash) by the Mapper.

public String
getMBeanKeyProperties()

Implements org.apache.catalina.Container.getMBeanKeyProperties.

Calculate the key properties string to be added to an object's ObjectName to indicate that it is associated with this container.

public String
getName()

Implements org.apache.catalina.Container.getName.

Return a name string (suitable for use by humans) that describes this Container.

public NamingResourcesImpl
public Object
protected String
getObjectNameKeyProperties()

Implements abstract org.apache.catalina.util.LifecycleMBeanBase.getObjectNameKeyProperties.

Allow sub-classes to specify the key properties component of the ObjectName that will be used to register this component.

public boolean
public boolean
public Container
getParent()

Implements org.apache.catalina.Container.getParent.

Get the parent container.

public ClassLoader
public String
public boolean
getPaused()

Implements org.apache.catalina.Context.getPaused.

Is this Context paused whilst it is reloaded?

public Pipeline
getPipeline()

Implements org.apache.catalina.Container.getPipeline.

Return the Pipeline object that manages the Valves associated with this Container.

public boolean
public boolean
public String
public Realm
getRealm()

Implements org.apache.catalina.Container.getRealm.

Obtain the Realm with which this Container is associated.

public String
getRealPath(String
The path to the desired resource
path
)

Implements org.apache.catalina.Context.getRealPath.

public boolean
public String
getRequestCharacterEncoding()

Implements org.apache.catalina.Context.getRequestCharacterEncoding.

Get the default request body encoding for this web application.

public String
getResourceOnlyServlets()

Implements org.apache.catalina.Context.getResourceOnlyServlets.

Obtains the list of Servlets that expect a resource to be present.

public WebResourceRoot
public String
getResponseCharacterEncoding()

Implements org.apache.catalina.Context.getResponseCharacterEncoding.

Get the default response body encoding for this web application.

public boolean
public ServletContext
public String
getSessionCookieDomain()

Implements org.apache.catalina.Context.getSessionCookieDomain.

Gets the domain to use for session cookies.

public String
getSessionCookieName()

Implements org.apache.catalina.Context.getSessionCookieName.

Gets the name to use for session cookies.

public String
getSessionCookiePath()

Implements org.apache.catalina.Context.getSessionCookiePath.

Gets the path to use for session cookies.

public boolean
getSessionCookiePathUsesTrailingSlash()

Implements org.apache.catalina.Context.getSessionCookiePathUsesTrailingSlash.

Is a / added to the end of the session cookie path to ensure browsers, particularly IE, don't send a session cookie for context /foo with requests intended for context /foobar.

public int
public int
getStartStopThreads()

Implements org.apache.catalina.Container.getStartStopThreads.

Obtain the number of threads available for starting and stopping any children associated with this container.

public boolean
getSwallowAbortedUploads()

Implements org.apache.catalina.Context.getSwallowAbortedUploads.

Returns true if remaining request data will be read (swallowed) even the request violates a data size constraint.

public boolean
public ThreadBindingListener
public boolean
getTldValidation()

Implements org.apache.catalina.Context.getTldValidation.

Will the parsing of *.tld files for this Context be performed by a validating parser?

public boolean
public boolean
getUseHttpOnly()

Implements org.apache.catalina.Context.getUseHttpOnly.

Gets the value of the use HttpOnly cookies for session cookies flag.

public boolean
getUsePartitioned()

Implements org.apache.catalina.Context.getUsePartitioned.

Should the Partitioned attribute be added to session cookies created for this web application.

public boolean
getUseRelativeRedirects()

Implements org.apache.catalina.Context.getUseRelativeRedirects.

Will HTTP 1.1 and later location headers generated by a call to jakarta.servlet.http.HttpServletResponse#sendRedirect(String) use relative or absolute redirects.

public boolean
public String
public String
public boolean
getXmlBlockExternal()

Implements org.apache.catalina.Context.getXmlBlockExternal.

Will the parsing of web.xml, web-fragment.xml, *.tld, *.jspx, *.tagx and tagplugin.xml files for this Context block the use of external entities?

public boolean
getXmlNamespaceAware()

Implements org.apache.catalina.Context.getXmlNamespaceAware.

Will the parsing of web.xml and web-fragment.xml files for this Context be performed by a namespace aware parser?

public boolean
getXmlValidation()

Implements org.apache.catalina.Context.getXmlValidation.

Will the parsing of web.xml and web-fragment.xml files for this Context be performed by a validating parser?

public void
public boolean
isResourceOnlyServlet(String
Name of the Servlet (as per web.xml) to check
servletName
)

Implements org.apache.catalina.Context.isResourceOnlyServlet.

Checks the named Servlet to see if it expects a resource to be present.

public boolean
isServlet22()

Implements org.apache.catalina.Context.isServlet22.

Is this context using version 2.2 of the Servlet spec?

public void
logAccess(Request
Request (associated with the response) to log
request
,
Response
Response (associated with the request) to log
response
,
long
Time taken to process the request/response in milliseconds (use 0 if not known)
time
,
boolean
Flag that indicates that the request/response should be logged in the engine's default access log
useDefault
)

Implements org.apache.catalina.Container.logAccess.

Log a request/response that was destined for this container but has been handled earlier in the processing chain so that the request/response still appears in the correct access logs.

public void
reload()

Implements org.apache.catalina.Context.reload.

Reload this web application, if reloading is supported.

public void
removeApplicationListener(String
Java class name of the listener to be removed
listener
)

Implements org.apache.catalina.Context.removeApplicationListener.

Remove the specified application listener class from the set of listeners for this application.

public void
removeApplicationParameter(String
Name of the application parameter to remove
name
)

Implements org.apache.catalina.Context.removeApplicationParameter.

Remove the application parameter with the specified name from the set for this application.

public void
removeChild(Container
Existing child Container to be removed
child
)

Implements org.apache.catalina.Container.removeChild.

Remove an existing child Container from association with this parent Container.

public void
removeConstraint(SecurityConstraint
Constraint to be removed
constraint
)

Implements org.apache.catalina.Context.removeConstraint.

Remove the specified security constraint from this web application.

public void
removeContainerListener(ContainerListener
The listener to remove
listener
)

Implements org.apache.catalina.Container.removeContainerListener.

Remove a container event listener from this component.

public void
removeErrorPage(ErrorPage
The error page definition to be removed
errorPage
)

Implements org.apache.catalina.Context.removeErrorPage.

Remove the error page for the specified error code or Java language exception, if it exists; otherwise, no action is taken.

public void
removeFilterDef(FilterDef
Filter definition to be removed
filterDef
)

Implements org.apache.catalina.Context.removeFilterDef.

Remove the specified filter definition from this Context, if it exists; otherwise, no action is taken.

public void
removeFilterMap(FilterMap
The filter mapping to be removed
filterMap
)

Implements org.apache.catalina.Context.removeFilterMap.

Remove a filter mapping from this Context.

public void
removeMimeMapping(String
Extension to remove the mapping for
extension
)

Implements org.apache.catalina.Context.removeMimeMapping.

Remove the MIME mapping for the specified extension, if it exists; otherwise, no action is taken.

public void
removeParameter(String
Name of the parameter to remove
name
)

Implements org.apache.catalina.Context.removeParameter.

Remove the context initialization parameter with the specified name, if it exists; otherwise, no action is taken.

public void
removePostConstructMethod(String
Fully qualified class name
clazz
)

Implements org.apache.catalina.Context.removePostConstructMethod.

Removes the post construct method definition for the given class, if it exists; otherwise, no action is taken.

public void
removePreDestroyMethod(String
Fully qualified class name
clazz
)

Implements org.apache.catalina.Context.removePreDestroyMethod.

Removes the pre destroy method definition for the given class, if it exists; otherwise, no action is taken.

public void
removePropertyChangeListener(PropertyChangeListener
The listener to remove
listener
)

Implements org.apache.catalina.Container.removePropertyChangeListener.

Remove a property change listener from this component.

public void
removeRoleMapping(String
Security role (as used in the application) to remove
role
)

Implements org.apache.catalina.Context.removeRoleMapping.

Remove any security role reference for the specified name

public void
removeSecurityRole(String
Security role to remove
role
)

Implements org.apache.catalina.Context.removeSecurityRole.

Remove any security role with the specified name.

public void
removeServletMapping(String
URL pattern of the mapping to remove
pattern
)

Implements org.apache.catalina.Context.removeServletMapping.

Remove any servlet mapping for the specified pattern, if it exists; otherwise, no action is taken.

public void
removeWatchedResource(String
Name of the watched resource to be removed
name
)

Implements org.apache.catalina.Context.removeWatchedResource.

Remove the specified watched resource name from the list associated with this Context.

public void
removeWelcomeFile(String
Name of the welcome file to be removed
name
)

Implements org.apache.catalina.Context.removeWelcomeFile.

Remove the specified welcome file name from the list recognized by this Context.

public void
removeWrapperLifecycle(String
Class name of a LifecycleListener class to be removed
listener
)

Implements org.apache.catalina.Context.removeWrapperLifecycle.

Remove a class name from the set of LifecycleListener classes that will be added to newly created Wrappers.

public void
removeWrapperListener(String
Class name of a ContainerListener class to be removed
listener
)

Implements org.apache.catalina.Context.removeWrapperListener.

Remove a class name from the set of ContainerListener classes that will be added to newly created Wrappers.

public void
setAddWebinfClassesResources(boolean
The new value for the flag
addWebinfClassesResources
)

Implements org.apache.catalina.Context.setAddWebinfClassesResources.

Sets the flag that indicates if /WEB-INF/classes should be treated like an exploded JAR and JAR resources made available as if they were in a JAR.

public void
setAllowCasualMultipartParsing(boolean
true to allow such casual parsing, false otherwise.
allowCasualMultipartParsing
)

Implements org.apache.catalina.Context.setAllowCasualMultipartParsing.

Set to true to allow requests mapped to servlets that do not explicitly declare @MultipartConfig or have <multipart-config> specified in web.xml to parse multipart/form-data requests.

public void
setAllowMultipleLeadingForwardSlashInPath(boolean
The new value for the flag
allowMultipleLeadingForwardSlashInPath
)

Implements org.apache.catalina.Context.setAllowMultipleLeadingForwardSlashInPath.

Configure if, when returning a context path from jakarta.servlet.http.HttpServletRequest#getContextPath(), the return value is allowed to contain multiple leading '/' characters.

public void
setAltDDName(String
The new name
altDDName
)

Implements org.apache.catalina.Context.setAltDDName.

Set an alternate Deployment Descriptor name.

public void
setAlwaysAccessSession(boolean
the new flag value
alwaysAccessSession
)

Implements org.apache.catalina.Context.setAlwaysAccessSession.

Set the session access behavior.

public void
setApplicationEventListeners(Object[]
The set of instantiated listener objects.
listeners
)

Implements org.apache.catalina.Context.setApplicationEventListeners.

Store the set of initialized application event listener objects, in the order they were specified in the web application deployment descriptor, for this application.

public void
setApplicationLifecycleListeners(Object[]
The set of instantiated listener objects.
listeners
)

Implements org.apache.catalina.Context.setApplicationLifecycleListeners.

Store the set of initialized application lifecycle listener objects, in the order they were specified in the web application deployment descriptor, for this application.

public void
setBackgroundProcessorDelay(int
The delay in seconds between the invocation of backgroundProcess methods
delay
)

Implements org.apache.catalina.Container.setBackgroundProcessorDelay.

Set the delay between the invocation of the execute method on this container and its children.

public void
setCluster(Cluster
the Cluster with which this Container is associated.
cluster
)

Implements org.apache.catalina.Container.setCluster.

Set the Cluster with which this Container is associated.

public void
setConfigFile(URL
The URL of the XML descriptor for this context.
configFile
)

Implements org.apache.catalina.Context.setConfigFile.

Set the URL of the XML descriptor for this context.

public void
setConfigured(boolean
The new correctly configured flag
configured
)

Implements org.apache.catalina.Context.setConfigured.

Set the "correctly configured" flag for this Context.

public void
setContainerSciFilter(String
The regular expression against which the fully qualified class name of each container provided SCI should be checked
containerSciFilter
)

Implements org.apache.catalina.Context.setContainerSciFilter.

Sets the regular expression that specifies which container provided SCIs should be filtered out and not used for this context.

public void
setContextGetResourceRequiresSlash(boolean
the new flag value
contextGetResourceRequiresSlash
)

Implements org.apache.catalina.Context.setContextGetResourceRequiresSlash.

Allow using ServletContext.getResource() or ServletContext.getResourceAsStream() without a leading "/".

public void
setCookieProcessor(CookieProcessor
The new cookie processor
cookieProcessor
)

Implements org.apache.catalina.Context.setCookieProcessor.

Sets the CookieProcessor that will be used to process cookies for this Context.

public void
setCookies(boolean
The new flag
cookies
)

Implements org.apache.catalina.Context.setCookies.

Set the "use cookies for session ids" flag.

public void
setCreateUploadTargets(boolean
true if Tomcat should attempt to create the upload target, otherwise false
createUploadTargets
)

Implements org.apache.catalina.Context.setCreateUploadTargets.

Configure whether Tomcat will attempt to create an upload target used by this web application if it does not exist when the web application attempts to use it.

public void
setCrossContext(boolean
The new cross contexts flag
crossContext
)

Implements org.apache.catalina.Context.setCrossContext.

Set the "allow crossing servlet contexts" flag.

public void
setDenyUncoveredHttpMethods(boolean
The new deny-uncovered-http-methods flag
denyUncoveredHttpMethods
)

Implements org.apache.catalina.Context.setDenyUncoveredHttpMethods.

Set the deny-uncovered-http-methods flag for this web application.

public void
setDispatchersUseEncodedPaths(boolean
true to use encoded paths, otherwise false
dispatchersUseEncodedPaths
)

Implements org.apache.catalina.Context.setDispatchersUseEncodedPaths.

Are paths used in calls to obtain a request dispatcher expected to be encoded?

public void
setDispatcherWrapsSameObject(boolean
the new flag value
dispatcherWrapsSameObject
)

Implements org.apache.catalina.Context.setDispatcherWrapsSameObject.

Allow disabling the object wrap check in the request dispatcher.

public void
setDisplayName(String
The new display name
displayName
)

Implements org.apache.catalina.Context.setDisplayName.

Set the display name of this web application.

public void
setDistributable(boolean
The new distributable flag
distributable
)

Implements org.apache.catalina.Context.setDistributable.

Set the distributable flag for this web application.

public void
setDocBase(String
The new document root
docBase
)

Implements org.apache.catalina.Context.setDocBase.

Set the document root for this Context.

public void
setEffectiveMajorVersion(int
Set the version number
major
)

Implements org.apache.catalina.Context.setEffectiveMajorVersion.

Set the effective major version of the Servlet spec used by this context.

public void
setEffectiveMinorVersion(int
Set the version number
minor
)

Implements org.apache.catalina.Context.setEffectiveMinorVersion.

Set the effective minor version of the Servlet spec used by this context.

public void
setFireRequestListenersOnForwards(boolean
true to fire request listeners when forwarding
enable
)

Implements org.apache.catalina.Context.setFireRequestListenersOnForwards.

Configure whether or not requests listeners will be fired on forwards for this Context.

public void
setIgnoreAnnotations(boolean
The boolean on the annotations parsing
ignoreAnnotations
)

Implements org.apache.catalina.Context.setIgnoreAnnotations.

Set the boolean on the annotations parsing for this web application.

public void
setInstanceManager(InstanceManager
the new instance manager instance
instanceManager
)

Implements org.apache.catalina.Context.setInstanceManager.

Set the instance manager associated with this context.

public void
setJarScanner(JarScanner
The Jar Scanner to be used for this context.
jarScanner
)

Implements org.apache.catalina.Context.setJarScanner.

Set the Jar Scanner to be used to scan for JAR resources for this context.

public void
setJspConfigDescriptor(JspConfigDescriptor
the new JSP configuration
descriptor
)

Implements org.apache.catalina.Context.setJspConfigDescriptor.

Set the JspConfigDescriptor for this context.

public void
setLoader(Loader
The newly associated loader
loader
)

Implements org.apache.catalina.Context.setLoader.

Set the Loader with which this Context is associated.

public void
setLogEffectiveWebXml(boolean
set to true to log the complete web.xml that will be used for the webapp
logEffectiveWebXml
)

Implements org.apache.catalina.Context.setLogEffectiveWebXml.

Set whether or not the effective web.xml for this context should be logged on context start.

public void
setLoginConfig(LoginConfig
The new login configuration
config
)

Implements org.apache.catalina.Context.setLoginConfig.

Set the login configuration descriptor for this web application.

public void
setManager(Manager
The newly associated Manager
manager
)

Implements org.apache.catalina.Context.setManager.

Set the Manager with which this Context is associated.

public void
setMapperContextRootRedirectEnabled(boolean
Should the redirects be enabled?
mapperContextRootRedirectEnabled
)

Implements org.apache.catalina.Context.setMapperContextRootRedirectEnabled.

If enabled, requests for a web application context root will be redirected (adding a trailing slash) by the Mapper.

public void
setMapperDirectoryRedirectEnabled(boolean
Should the redirects be enabled?
mapperDirectoryRedirectEnabled
)

Implements org.apache.catalina.Context.setMapperDirectoryRedirectEnabled.

If enabled, requests for a directory will be redirected (adding a trailing slash) by the Mapper.

public void
setName(String
New name of this container
name
)

Implements org.apache.catalina.Container.setName.

Set a name string (suitable for use by humans) that describes this Container.

public void
setNamingResources(NamingResourcesImpl
The new naming resources
namingResources
)

Implements org.apache.catalina.Context.setNamingResources.

Set the naming resources for this web application.

public void
setOverride(boolean
The new override flag
override
)

Implements org.apache.catalina.Context.setOverride.

Set the override flag for this web application.

public void
setParallelAnnotationScanning(boolean
new parallel annotation scanning flag
parallelAnnotationScanning
)

Implements org.apache.catalina.Context.setParallelAnnotationScanning.

Set the parallel annotation scanning value.

public void
setParent(Container
Container to which this Container is being added as a child
parent
)

Implements org.apache.catalina.Container.setParent.

Set the parent Container to which this Container is being added as a child.

public void
setParentClassLoader(ClassLoader
The new parent class loader
parent
)

Implements org.apache.catalina.Container.setParentClassLoader.

Set the parent class loader for this component.

public void
setPath(String
The new context path
path
)

Implements org.apache.catalina.Context.setPath.

Set the context path for this web application.

public void
setPreemptiveAuthentication(boolean
true to perform authentication even outside security constraints
enable
)

Implements org.apache.catalina.Context.setPreemptiveAuthentication.

Configures if a user presents authentication credentials, whether the context will process them when the request is for a non-protected resource.

public void
setPrivileged(boolean
The new privileged flag
privileged
)

Implements org.apache.catalina.Context.setPrivileged.

Set the privileged flag for this web application.

public void
setPublicId(String
The public identifier
publicId
)

Implements org.apache.catalina.Context.setPublicId.

Set the public identifier of the deployment descriptor DTD that is currently being parsed.

public void
setRealm(Realm
The newly associated Realm
realm
)

Implements org.apache.catalina.Container.setRealm.

Set the Realm with which this Container is associated.

public void
setReloadable(boolean
The new reloadable flag
reloadable
)

Implements org.apache.catalina.Context.setReloadable.

Set the reloadable flag for this web application.

public void
setRequestCharacterEncoding(String
The default encoding
encoding
)

Implements org.apache.catalina.Context.setRequestCharacterEncoding.

Set the default request body encoding for this web application.

public void
setResourceOnlyServlets(String
The Servlet names comma separated list
resourceOnlyServlets
)

Implements org.apache.catalina.Context.setResourceOnlyServlets.

Sets the (comma separated) list of Servlets that expect a resource to be present.

public void
setResources(WebResourceRoot
The newly associated Resources
resources
)

Implements org.apache.catalina.Context.setResources.

Set the Resources object with which this Context is associated.

public void
setResponseCharacterEncoding(String
The default encoding
encoding
)

Implements org.apache.catalina.Context.setResponseCharacterEncoding.

Set the default response body encoding for this web application.

public void
setSendRedirectBody(boolean
true to send a response body for redirects
enable
)

Implements org.apache.catalina.Context.setSendRedirectBody.

Configures if a response body is included when a redirect response is sent to the client.

public void
setSessionCookieDomain(String
The domain to use
sessionCookieDomain
)

Implements org.apache.catalina.Context.setSessionCookieDomain.

Sets the domain to use for session cookies.

public void
setSessionCookieName(String
The name to use
sessionCookieName
)

Implements org.apache.catalina.Context.setSessionCookieName.

Sets the name to use for session cookies.

public void
setSessionCookiePath(String
The path to use
sessionCookiePath
)

Implements org.apache.catalina.Context.setSessionCookiePath.

Sets the path to use for session cookies.

public void
setSessionCookiePathUsesTrailingSlash(boolean
true if the slash is should be added, otherwise false
sessionCookiePathUsesTrailingSlash
)

Implements org.apache.catalina.Context.setSessionCookiePathUsesTrailingSlash.

Configures if a / is added to the end of the session cookie path to ensure browsers, particularly IE, don't send a session cookie for context /foo with requests intended for context /foobar.

public void
setSessionTimeout(int
The new default session timeout
timeout
)

Implements org.apache.catalina.Context.setSessionTimeout.

Set the default session timeout (in minutes) for this web application.

public void
setStartStopThreads(int
The new number of threads to be used
startStopThreads
)

Implements org.apache.catalina.Container.setStartStopThreads.

Sets the number of threads available for starting and stopping any children associated with this container.

public void
setSwallowAbortedUploads(boolean
false to disable swallowing, true otherwise (default).
swallowAbortedUploads
)

Implements org.apache.catalina.Context.setSwallowAbortedUploads.

Set to false to disable request data swallowing after an upload was aborted due to size constraints.

public void
setSwallowOutput(boolean
The new value
swallowOutput
)

Implements org.apache.catalina.Context.setSwallowOutput.

Set the value of the swallowOutput flag.

public void
setThreadBindingListener(ThreadBindingListener
Set the listener that will receive notifications when entering and exiting the application scope
threadBindingListener
)

Implements org.apache.catalina.Context.setThreadBindingListener.

Get the associated ThreadBindingListener.

public void
setTldValidation(boolean
true to enable xml validation
tldValidation
)

Implements org.apache.catalina.Context.setTldValidation.

Controls whether the parsing of *.tld files for this Context will be performed by a validating parser.

public void
setUseBloomFilterForArchives(boolean
The new fast class path scan flag
useBloomFilterForArchives
)

Implements org.apache.catalina.Context.setUseBloomFilterForArchives.

Set bloom filter flag value.

public void
setUseHttpOnly(boolean
Set to true to use HttpOnly cookies for session cookies
useHttpOnly
)

Implements org.apache.catalina.Context.setUseHttpOnly.

Sets the use HttpOnly cookies for session cookies flag.

public void
setUsePartitioned(boolean
true if the Partitioned attribute should be added to session cookies created for this web application, otherwise false
usePartitioned
)

Implements org.apache.catalina.Context.setUsePartitioned.

Configure whether the Partitioned attribute should be added to session cookies created for this web application.

public void
setUseRelativeRedirects(boolean
true to use relative redirects and false to use absolute redirects
useRelativeRedirects
)

Implements org.apache.catalina.Context.setUseRelativeRedirects.

Controls whether HTTP 1.1 and later location headers generated by a call to jakarta.servlet.http.HttpServletResponse#sendRedirect(String) will use relative or absolute redirects.

public void
setValidateClientProvidedNewSessionId(boolean
true if validation should be applied
validateClientProvidedNewSessionId
)

Implements org.apache.catalina.Context.setValidateClientProvidedNewSessionId.

When a client provides the ID for a new session, should that ID be validated?

public void
setWebappVersion(String
The webapp version associated with the context, which should be unique
webappVersion
)

Implements org.apache.catalina.Context.setWebappVersion.

Set the version of this web application - used to differentiate different versions of the same web application when using parallel deployment.

public void
setWrapperClass(String
The new wrapper class
wrapperClass
)

Implements org.apache.catalina.Context.setWrapperClass.

Set the Java class name of the Wrapper implementation used for servlets registered in this Context.

public void
setXmlBlockExternal(boolean
true to block external entities
xmlBlockExternal
)

Implements org.apache.catalina.Context.setXmlBlockExternal.

Controls whether the parsing of web.xml, web-fragment.xml, *.tld, *.jspx, *.tagx and tagplugin.xml files for this Context will block the use of external entities.

public void
setXmlNamespaceAware(boolean
true to enable namespace awareness
xmlNamespaceAware
)

Implements org.apache.catalina.Context.setXmlNamespaceAware.

Controls whether the parsing of web.xml and web-fragment.xml files for this Context will be performed by a namespace aware parser.

public void
setXmlValidation(boolean
true to enable xml validation
xmlValidation
)

Implements org.apache.catalina.Context.setXmlValidation.

Controls whether the parsing of web.xml and web-fragment.xml files for this Context will be performed by a validating parser.

protected void
startInternal()

Implements abstract org.apache.catalina.util.LifecycleBase.startInternal.

Sub-classes must ensure that the state is changed to LifecycleState#STARTING during the execution of this method.

protected void
stopInternal()

Implements abstract org.apache.catalina.util.LifecycleBase.stopInternal.

Sub-classes must ensure that the state is changed to LifecycleState#STOPPING during the execution of this method.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
unbind(boolean
Should a java.security.PrivilegedAction be used when setting the current thread context class loader?
usePrivilegedAction
,
ClassLoader
The class loader to restore as the thread context class loader
originalClassLoader
)

Implements org.apache.tomcat.ContextBind.unbind.

Restore the current thread context class loader to the original class loader in used before bind(boolean, ClassLoader) was called.

Inherited from org.apache.catalina.util.LifecycleMBeanBase:
destroyInternalgetDomaingetObjectNameinitInternalpostDeregisterpostRegisterpreDeregisterpreRegisterregistersetDomainunregisterunregister