| Modifier and Type | Class and Description |
|---|---|
| private static class | StandardContext.
A helper class to manage the filter mappings in a Context. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| protected boolean | allowCasualMultipartParsing
Allow multipart/form-data requests to be parsed even when the target servlet doesn't specify @MultipartConfig or have a <multipart-config> element. |
| private boolean | |
| private String | altDDName
The alternate deployment descriptor name. |
| private boolean | |
| private boolean | antiResourceLocking
The antiResourceLocking flag for this Context. |
| private List | applicationEventListenersList
The list of instantiated application event listener objects. |
| private Object[] | applicationLifecycleListenersObjects
The set of instantiated application lifecycle listener objects. |
| private CopyOnWriteArrayList | applicationListeners
The list of unique application listener class names configured for this application, in the order they were encountered in the resulting merged web.xml file. |
| private ApplicationParameter[] | applicationParameters
The set of application parameters defined for this application. |
| private final Object | |
| private NotificationBroadcasterSupport | broadcaster
The broadcaster that sends j2ee notifications. |
| private CharsetMapper | charsetMapper
The Locale to character set mapper for this application. |
| private String | charsetMapperClass
The Java class name of the CharsetMapper class to be created. |
| private boolean | clearReferencesHttpClientKeepAliveThread
If an HttpClient keep-alive timer thread has been started by this web application and is still running, should
Tomcat change the context class loader from the current |
| private boolean | clearReferencesObjectStreamClassCaches
Should Tomcat attempt to clear references to classes loaded by the web application class loader from the ObjectStreamClass caches? |
| private boolean | clearReferencesRmiTargets
Enables the RMI Target memory leak detection to be controlled. |
| private boolean | clearReferencesStopThreads
Should Tomcat attempt to terminate threads that have been started by the web application? |
| private boolean | clearReferencesStopTimerThreads
Should Tomcat attempt to terminate any |
| private boolean | clearReferencesThreadLocals
Should Tomcat attempt to clear references to classes loaded by this class loader from ThreadLocals? |
| private URL | configFile
The URL of the XML descriptor for this context. |
| private boolean | configured
The "correctly configured" flag for this Context. |
| private volatile SecurityConstraint[] | constraints
The security constraints for this web application. |
| private final Object | |
| private String | |
| protected ApplicationContext | context
The ServletContext implementation associated with this Context. |
| private boolean | |
| private CookieProcessor | |
| private boolean | cookies
Should we attempt to use cookies for session id communication? |
| private boolean | copyXML
Context level override for default |
| private Set | createdServlets
Servlets created via |
| private boolean | |
| private boolean | crossContext
Should we allow the |
| protected static final ThreadBindingListener | |
| private String | defaultContextXml
Override the default context xml location. |
| private String | defaultWebXml
Override the default web xml location. |
| private boolean | delegate
The "follow standard delegation model" flag that will be used to configure our ClassLoader. |
| private boolean | |
| private boolean | |
| private boolean | |
| private String | displayName
The display name of this web application. |
| private boolean | distributable
The distributable flag for this web application. |
| private String | docBase
The document root for this web application. |
| private int | |
| private int | |
| private String | encodedPath
Encoded path. |
| private final ErrorPageSupport | |
| private Boolean | |
| private Map | filterConfigs
The set of filter configurations (and associated filter instances) we have initialized, keyed by filter name. |
| private Map | filterDefs
The set of filter definitions for this application, keyed by filter name. |
| private final StandardContext. | filterMaps
The set of filter mappings for this application, in the order they were defined in the deployment descriptor with
additional mappings added via the |
| private boolean | |
| private boolean | ignoreAnnotations
Ignore annotations. |
| private Map | initializers
The ordered set of ServletContainerInitializers for this web application. |
| private final AtomicLong | |
| private InstanceManager | instanceManager
Lifecycle provider. |
| private String | j2EEApplication
Name of the engine. |
| private String | |
| private JarScanner | jarScanner
The Jar scanner to use to search for Jars that might contain configuration information such as TLDs or web-fragment.xml files. |
| private boolean | |
| private JspConfigDescriptor | |
| private Loader | loader
The Loader implementation with which this Container is associated. |
| private final ReadWriteLock | |
| private static final Log | |
| private boolean | logEffectiveWebXml
Should the effective web.xml be logged when the context starts? |
| private LoginConfig | loginConfig
The login configuration descriptor for this web application. |
| protected Manager | manager
The Manager implementation with which this Container is associated. |
| private final ReadWriteLock | |
| private boolean | |
| private boolean | |
| private HashMap | messageDestinations
The message destinations for this web application. |
| private Map | mimeMappings
The MIME mappings for this web application, keyed by extension. |
| private NamingContextListener | namingContextListener
The naming context listener for this web application. |
| private String | namingContextName
Name of the associated naming context. |
| private NamingResourcesImpl | namingResources
The naming resources for this web application. |
| private final Object | |
| private final Set | noPluggabilityListeners
The set of application listeners that are required to have limited access to ServletContext methods. |
| private StandardContext. | noPluggabilityServletContext
The wrapped version of the associated ServletContext that is presented to listeners that are required to have limited access to ServletContext methods. |
| private MBeanNotificationInfo[] | |
| private String | originalDocBase
The original document root for this web application. |
| private boolean | override
The default context override flag for this web application. |
| private boolean | |
| private final Map | parameters
The context initialization parameters for this web application, keyed by name. |
| private String | path
Unencoded path for this web application. |
| private volatile boolean | paused
The request processing pause flag (while reloading occurs) |
| private Map | |
| private Map | |
| private boolean | |
| private boolean | privileged
The privileged flag for this web application. |
| private String | publicId
The public identifier of the DTD for the web application deployment descriptor version we are currently parsing. |
| private boolean | reloadable
The reloadable flag for this web application. |
| private boolean | renewThreadsWhenStoppingContext
Should Tomcat renew the threads of the thread pool when the application is stopped to avoid memory leaks because of uncleaned ThreadLocal variables. |
| private boolean | replaceWelcomeFiles
Should the next call to |
| private String | |
| private Set | |
| private WebResourceRoot | |
| private final ReadWriteLock | |
| private String | |
| private Map | roleMappings
The security role mappings for this application, keyed by role name (as used within the application). |
| private String[] | securityRoles
The security roles for this application, keyed by role name. |
| private final Object | |
| private boolean | |
| private AtomicLong | sequenceNumber
The notification sequence number. |
| private String | server
The J2EE Server ObjectName this module is deployed on. |
| private Map | servletMappings
The servlet mappings for this web application, keyed by matching pattern. |
| private final Object | |
| private String | sessionCookieDomain
The domain to use for session cookies. |
| private String | sessionCookieName
The name to use for session cookies. |
| private String | sessionCookiePath
The path to use for session cookies. |
| private boolean | sessionCookiePathUsesTrailingSlash
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. |
| private int | sessionTimeout
The session timeout (in minutes) for this web application. |
| private boolean | skipMemoryLeakChecksOnJvmShutdown
Should Tomcat skip the memory leak checks when the web application is stopped as part of the process of shutting down the JVM? |
| private long | |
| private long | |
| private boolean | swallowAbortedUploads
Control whether remaining request data will be read (swallowed) even if the request violates a data size constraint. |
| private boolean | swallowOutput
Set flag to true to cause the system.out and system.err to be redirected to the logger when executing a servlet. |
| protected ThreadBindingListener | |
| private long | |
| private boolean | tldValidation
Attribute value used to turn on/off XML validation |
| private long | unloadDelay
Amount of ms that the container will wait for servlets to unload. |
| private boolean | unpackWAR
Unpack WAR property. |
| private boolean | |
| private boolean | useHttpOnly
The flag that indicates that session cookies should use HttpOnly |
| private boolean | useNaming
JNDI use flag. |
| private boolean | |
| private boolean | |
| private boolean | |
| private String[] | watchedResources
The watched resources for this application. |
| private final Object | |
| private String | |
| private boolean | webXmlNamespaceAware
Attribute value used to turn on/off XML namespace validation |
| private boolean | webXmlValidation
Attribute value used to turn on/off XML validation for web.xml and web-fragment.xml files. |
| private String[] | welcomeFiles
The welcome files for this application. |
| private final Object | |
| private String | workDir
The pathname to the work directory for this context (relative to the server's home if not absolute). |
| private Class | |
| private String | wrapperClassName
Java class name of the Wrapper class implementation we use. |
| private String[] | wrapperLifecycles
The set of classnames of LifecycleListeners that will be added to each newly created Wrapper by
|
| private final Object | |
| private String[] | wrapperListeners
The set of classnames of ContainerListeners that will be added to each newly created Wrapper by
|
| private final Object | |
| private boolean | xmlBlockExternal
Attribute used to turn on/off the use of external entities. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addApplicationEventListener(Object
The listener to add listener)Add a listener to the end of the list of initialized application event listeners. |
| public void | addApplicationLifecycleListener(Object
The listener to add listener)Add a listener to the end of the list of initialized application lifecycle listeners. |
| public void | addApplicationListener(String
Java class name of a listener class listener)Implements org. 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. Add a new application parameter for this application. |
| public void | addChild(Container
Child container to be added child)Overrides org. Implements org. Add a child Container, only if the proposed child is an implementation of Wrapper. |
| public void | addConstraint(SecurityConstraint
the new security constraint constraint)Implements org. Add a security constraint to the set for this web application. |
| public void | addErrorPage(ErrorPage
The error page definition to be added errorPage)Implements org. Add an error page for the specified error or Java exception. |
| public void | addFilterDef(FilterDef
The filter definition to be added filterDef)Implements org. Add a filter definition to this Context. |
| public void | addFilterMap(FilterMap
The filter mapping to be added filterMap)Implements org. Add a filter mapping to this Context at the end of the current set of filter mappings. |
| public void | addFilterMapBefore(FilterMap
The filter mapping to be added filterMap)Implements org. Add a filter mapping to this Context before the mappings defined in the deployment descriptor but after any other mappings added via this method. |
| private void | |
| public void | addLocaleEncodingMappingParameter(String
locale to map an encoding for locale, String encoding to be used for a give locale encoding)Implements org. Add a Locale Encoding Mapping (see Sec 5.4 of Servlet spec 2.4) |
| public void | addMessageDestination(MessageDestination
New message destination md)Add a message destination for this web application. |
| public void | addMimeMapping(String
Filename extension being mapped extension, String Corresponding MIME type mimeType)Implements org. Add a new MIME mapping, replacing any existing mapping for the specified extension. |
| public void | addNotificationListener(NotificationListener
The listener object which will handle the
notifications emitted by the broadcaster. listener, NotificationFilter The filter object. If filter is null, no
filtering will be performed before handling notifications. filter, Object An opaque object to be sent back to the
listener when a notification is emitted. This object cannot be
used by the Notification broadcaster object. It should be
resent unchanged with the notification to the listener. object)Implements javax. Add a JMX NotificationListener |
| public void | addParameter(String
Name of the new parameter name, String Value of the new parameter value)Implements org. Add a new context initialization parameter. |
| public void | addPostConstructMethod(String
Fully qualified class name clazz, String Post construct method name method)Implements org. 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. 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 | addRoleMapping(String
Security role used in the application role, String Actual security role to check for link)Implements org. Add a security role reference for this web application. |
| public void | addSecurityRole(String
New security role role)Implements org. 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. 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. Add a new servlet mapping, replacing any existing mapping for the specified pattern. |
| public Set | addServletSecurity(ServletRegistration.
Servlet security was modified for registration,new security constraints for this Servlet servletSecurityElement)Implements org. Notification that Servlet security has been dynamically set in a
|
| public void | addWatchedResource(String
New watched resource file name name)Implements org. Add a new watched resource to the set recognized by this Context. |
| public void | addWelcomeFile(String
New welcome file name name)Implements org. 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. 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. Add the classname of a ContainerListener to be added to each Wrapper appended to this Context. |
| protected String | Returns: the URL pattern with a leading slash if neededThe URL pattern to be adjusted (if needed) and returned urlPattern)Adjust the URL pattern to begin with a leading slash, if appropriate (i.e. we are running a servlet 2.2 application). |
| public synchronized void | backgroundProcess()
Overrides org. Implements org. 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 usePrivilegedAction, ClassLoader java. be used when
obtaining the current thread context class loader and setting
the new one?The current class loader if known to save this method having to
look it up originalClassLoader)Implements org. Change the current thread context class loader to the web application class loader. |
| protected ClassLoader | Returns: the previous context class loaderBind current thread, both for CL purposes and for JNDI ENC support during : startup, shutdown and reloading of the context. |
| private Map | |
| private void | |
| private void | |
| public InstanceManager | createInstanceManager()
Implements org. Factory method to create and return a new InstanceManager instance. |
| public Wrapper | createWrapper()
Implements org. Factory method to create and return a new Wrapper instance, of the Java implementation class appropriate for this Context implementation. |
| public void | |
| protected void | destroyInternal()
Overrides org. Destroy needs to clean up the context completely. |
| public void | dynamicServletCreated(Servlet
the created Servlet servlet)Hook to track which Servlets were created via |
| public boolean | Returns: true if all filter initialization completed successfully, or false otherwise.Configure and initialize the set of filters for this Context. |
| public boolean | Returns: true if all filter finalization completed successfully, or false otherwise.Finalize and release the set of filters for this Context. |
| public String[] | findApplicationListeners()
Implements org. Return the set of application listener class names configured for this application. |
| public ApplicationParameter[] | findApplicationParameters()
Implements org. Return the set of application parameters for this application. |
| public SecurityConstraint[] | findConstraints()
Implements org. Return the security constraints for this web application. |
| public ErrorPage | findErrorPage(int
Error code to look up errorCode)Implements org. Return the error page entry for the specified HTTP error code, if any; otherwise return |
| public ErrorPage | findErrorPage(Throwable
The exception type for which to find an ErrorPage exceptionType)Implements org. 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[] | findErrorPages()
Implements org. Return the set of defined error pages for all specified error codes and exception types. |
| public FilterConfig | Returns: the filter config objectName of the desired filter name)Find and return the initialized |
| public FilterDef | findFilterDef(String
Filter name to look up filterName)Implements org. Return the filter definition for the specified filter name, if any; otherwise return |
| public FilterDef[] | Returns: the set of defined filters for this Context.Implements org.
|
| public FilterMap[] | Returns: the set of filter mappings for this Context.Implements org.
|
| public MessageDestination | Returns: the message destination with the specified name, if any; otherwise, returnnull.Name of the desired message destination name)
|
| public MessageDestination[] | Returns: the set of defined message destinations for this web application. If none have been defined, a zero-length array is returned.
|
| public String | Returns: the MIME type to which the specified extension is mapped, if any; otherwise returnnull.Extension to map to a MIME type extension)Implements org.
|
| public String[] | Returns: the extensions for which MIME mappings are defined. If there are none, a zero-length array is returned.Implements org.
|
| public String | Returns: the value for the specified context initialization parameter name, if any; otherwise returnnull.Name of the parameter to return name)Implements org.
|
| public String[] | Returns: the names of all defined context initialization parameters for this Context. If no parameters are defined, a zero-length array is returned.Implements org.
|
| public String | findPostConstructMethod(String
Fully qualified class name clazz)Implements org. Returns the method name that is specified as post construct method for
the given class, if it exists; otherwise |
| public Map | findPostConstructMethods()
Implements org. 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. Returns the method name that is specified as pre destroy method for the
given class, if it exists; otherwise |
| public Map | findPreDestroyMethods()
Implements org. 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 | Returns: the role nameSecurity role to map role)Implements org. 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 | Returns: true if the specified security role is defined for this application; otherwise return
false.Security role to verify role)Implements org.
|
| public String[] | Returns: the security roles defined for this application. If none have been defined, a zero-length array is returned.Implements org.
|
| public String | Returns: the servlet name mapped by the specified pattern (if any); otherwise returnnull.Pattern for which a mapping is requested pattern)Implements org.
|
| public String[] | Returns: the patterns of all defined servlet mappings for this Context. If no mappings are defined, a zero-length array is returned.Implements org.
|
| public String[] | Returns: the set of watched resources for this Context. If none are defined, a zero length array will be returned.Implements org.
|
| public boolean | Returns: true if the specified welcome file is defined for this Context; otherwise return
false.Welcome file to verify name)Implements org.
|
| public String[] | Returns: the set of welcome files defined for this Context. If none are defined, a zero-length array is returned.Implements org.
|
| public String[] | Returns: the set of LifecycleListener classes that will be added to newly created Wrappers automatically.Implements org.
|
| public String[] | Returns: the set of ContainerListener classes that will be added to newly created Wrappers automatically.Implements org.
|
| public boolean | fireRequestDestroyEvent(ServletRequest
The request object that will be passed to the listener request)Implements org. Notify all |
| public boolean | fireRequestInitEvent(ServletRequest
The request object that will be passed to the listener request)Implements org. Notify all |
| public boolean | |
| public boolean | Returns: true if requests mapped to servlets without "multipart config" to parse multipart/form-data
requests, false otherwise.Implements org. Returns |
| public boolean | getAllowMultipleLeadingForwardSlashInPath()
Implements org. When returning a context path from |
| public String | Returns: the alternate Deployment Descriptor name.Implements org. Return the alternate Deployment Descriptor name. |
| public boolean | getAlwaysAccessSession()
Implements org. If this is |
| public boolean | |
| public Object[] | getApplicationEventListeners()
Implements org. Obtain the registered application event listeners. |
| public Object[] | getApplicationLifecycleListeners()
Implements org. Obtain the registered application lifecycle listeners. |
| public Authenticator | |
| public String | |
| public String | getCharset(Locale
The locale for which the mapped character set should be
returned locale)Implements org. Obtain the character set name to use with the given Locale. |
| public CharsetMapper | |
| public String | |
| public boolean | Returns: the clearReferencesHttpClientKeepAliveThread flag for this Context.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: the clearReferencesStopTimerThreads flag for this Context.
|
| public boolean | |
| protected boolean | |
| public URL | getConfigFile()
Implements org. Return the URL of the XML descriptor for this context. |
| public boolean | getConfigured()
Implements org. Return the "correctly configured" flag for this Context. |
| public String | getContainerSciFilter()
Implements org. 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. If this is |
| public CookieProcessor | |
| public boolean | getCookies()
Implements org. Return the "use cookies for session ids" flag. |
| public boolean | Returns: true if the META-INF/context.xml file included in a WAR will be copied to the
host configuration base folder on deploymentFlag which indicates if bundled context.xml files should be copied to the config folder. |
| public boolean | getCreateUploadTargets()
Implements org. 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. Return the "allow crossing servlet contexts" flag. |
| public String | |
| public String | |
| public boolean | Returns: true if classloading delegates to the parent classloader firstReturn the "follow standard delegation model" flag used to configure our ClassLoader. |
| public boolean | getDenyUncoveredHttpMethods()
Implements org. Return the deny-uncovered-http-methods flag for this web application. |
| public boolean | getDispatchersUseEncodedPaths()
Implements org. Are paths used in calls to obtain a request dispatcher expected to be encoded? |
| public boolean | getDispatcherWrapsSameObject()
Implements org. If this is |
| public String | Returns: the display name of this web application.Implements org. Return the display name of this web application. |
| public boolean | Returns: the distributable flag for this web application.Implements org. Get the distributable flag for this web application. |
| public String | getDocBase()
Implements org. Obtain the document root for this Context. |
| public int | |
| public int | |
| public String | getEncodedPath()
Implements org. Return the URL encoded context path |
| public int | Returns: Cumulative error count of all servlets in this StandardContext
Deprecated
The return type will change to long in Tomcat 11 onwards. Callers of this method should switch to
storing the result of calls to this method in a long value rather than an int.
Gets the cumulative error count of all servlets in this StandardContext. |
| public Boolean | |
| public boolean | |
| public boolean | Returns: the boolean on the annotations parsing.Implements org. Determine if annotations parsing is currently disabled |
| public long | |
| public InstanceManager | |
| public String | |
| public String | |
| public JarScanner | getJarScanner()
Implements org. Get the Jar Scanner to be used to scan for JAR resources for this context. |
| public boolean | Returns: whether or not an attempt to modify the JNDI context will trigger an exception or if the request will be ignored.
|
| public JspConfigDescriptor | |
| public Loader | |
| public boolean | getLogEffectiveWebXml()
Implements org. Should the effective web.xml for this context be logged on context start? |
| public LoginConfig | Returns: the login configuration descriptor for this web application.Implements org.
|
| public Manager | |
| public boolean | getMapperContextRootRedirectEnabled()
Implements org. Determines if requests for a web application context root will be redirected (adding a trailing slash) by the Mapper. |
| public boolean | getMapperDirectoryRedirectEnabled()
Implements org. Determines if requests for a directory will be redirected (adding a trailing slash) by the Mapper. |
| public long | Returns: Maximum processing time of all servlets in this StandardContextGets the maximum processing time of all servlets in this StandardContext. |
| public long | Returns: Minimum processing time of all servlets in this StandardContextGets the minimum processing time of all servlets in this StandardContext. |
| public NamingContextListener | Returns: the naming context listener associated with the webappNaming context listener accessor. |
| private String | |
| public NamingResourcesImpl | Returns: the naming resources associated with this web application.Implements org.
|
| public Object | |
| public MBeanNotificationInfo[] | getNotificationInfo()
Implements javax. Get JMX Broadcaster Info |
| private String | |
| protected String | getObjectNameKeyProperties()
Implements abstract org. Allow sub-classes to specify the key properties component of the
|
| public String | Returns: the original document root for this Context. This can be an absolute pathname, a relative pathname, or a URL. Is only set as deployment has change docRoot!
|
| public boolean | Returns: the default context override flag for this web application.Implements org.
|
| public boolean | |
| public ClassLoader | Returns: the parent class loader (if any) for this web application. This call is meaningful only after a Loader has been configured.Overrides org. Implements org. Get the parent class loader. |
| public String | |
| public boolean | Returns: the request processing paused flag for this Context.Implements org. Is this Context paused whilst it is reloaded? |
| public boolean | |
| public boolean | Returns: the privileged flag for this web application.Implements org.
|
| public long | Returns: Cumulative processing times of all servlets in this StandardContextGets the cumulative processing times of all servlets in this StandardContext. |
| public String | Returns: the public identifier of the deployment descriptor DTD that is currently being parsed.Implements org.
|
| public String | getRealPath(String
The path to the desired resource path)Implements org. Return the real path for a given virtual path, if possible; otherwise return |
| public boolean | Returns: the reloadable flag for this web application.Implements org.
|
| public boolean | |
| public String | getRequestCharacterEncoding()
Implements org. Get the default request body encoding for this web application. |
| public int | Returns: Cumulative request count of all servlets in this StandardContext
Deprecated
The return type will change to long in Tomcat 11 onwards. Callers of this method should switch to
storing the result of calls to this method in a long value rather than an int.
Gets the cumulative request count of all servlets in this StandardContext. |
| public String | getResourceOnlyServlets()
Implements org. Obtains the list of Servlets that expect a resource to be present. |
| public WebResourceRoot | |
| public String | getResponseCharacterEncoding()
Implements org. Get the default response body encoding for this web application. |
| public boolean | |
| public String | |
| public ServletContext | Returns: the servlet context for which this Context is a facade.Implements org.
|
| public String | Returns: The value of the default session cookie domain or null if not specifiedImplements org. Gets the domain to use for session cookies. |
| public String | Returns: The value of the default session cookie name or null if not specifiedImplements org. Gets the name to use for session cookies. |
| public String | Returns: The value of the default session cookie path or null if not specifiedImplements org. Gets the path to use for session cookies. |
| public boolean | getSessionCookiePathUsesTrailingSlash()
Implements org. 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 | Returns: the default session timeout (in minutes) for this web application.Implements org.
|
| public boolean | |
| public long | Returns: Time (in milliseconds since January 1, 1970, 00:00:00) when this context was startedGets the time this context was started. |
| public long | Returns: Time (in milliseconds) it took to start this context.Gets the time (in milliseconds) it took to start this context. |
| public boolean | Returns: true if data will be swallowed (default), false otherwise.Implements org. Returns |
| public boolean | Returns: the value of the swallowOutput flag.Implements org.
|
| public ThreadBindingListener | |
| public long | |
| public boolean | getTldValidation()
Implements org. Will the parsing of *.tld files for this Context be performed by a validating parser? |
| public long | |
| public boolean | |
| public boolean | getUseBloomFilterForArchives()
Implements org.
Deprecated
|
| public boolean | Returns: true if the HttpOnly flag should be set on session cookiesImplements org. Gets the value of the use HttpOnly cookies for session cookies flag. |
| public boolean | getUsePartitioned()
Implements org. Should the |
| public boolean | getUseRelativeRedirects()
Implements org. Will HTTP 1.1 and later location headers generated by a call to
|
| public boolean | getValidateClientProvidedNewSessionId()
Implements org. Will client provided session IDs be validated (see |
| public String | |
| public String[] | |
| public String | |
| public String | |
| public String | Returns: the Java class name of the Wrapper implementation used for servlets registered in this Context.Implements org.
|
| public boolean | getXmlBlockExternal()
Implements org. 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. 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. Will the parsing of web.xml and web-fragment.xml files for this Context be performed by a validating parser? |
| public void | |
| protected void | initInternal()
Overrides org. Sub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method. |
| public boolean | isResourceOnlyServlet(String
Name of the Servlet (as per web.xml) to check servletName)Implements org. Checks the named Servlet to see if it expects a resource to be present. |
| public boolean | Returns: true if running a legacy Servlet 2.2 applicationImplements org. Are we processing a version 2.2 deployment descriptor? |
| public boolean | |
| public boolean | Returns: true if all listeners wre initialized successfully, or false otherwise.Configure the set of instantiated application event listeners for this Context. |
| public boolean | Returns: true if all events were sent successfully, or false otherwise.Send an application stop event to all interested listeners. |
| public boolean | Returns: true if load on startup was considered successfulArray of wrappers for all currently defined servlets (including those not declared load on
startup) children)Load and initialize all servlets marked "load on startup" in the web application deployment descriptor. |
| private void | mergeParameters()
Merge the context initialization parameters specified in the application deployment descriptor with the
application parameters described in the server configuration, respecting the |
| protected void | |
| public synchronized void | reload()
Implements org. Reload this web application, if reloading is supported. |
| public void | removeApplicationListener(String
Java class name of the listener to be removed listener)Implements org. 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. Remove the application parameter with the specified name from the set for this application. |
| public void | removeChild(Container
Child container to be added child)Overrides org. Implements org. Add a child Container, only if the proposed child is an implementation of Wrapper. |
| public void | removeConstraint(SecurityConstraint
Constraint to be removed constraint)Implements org. Remove the specified security constraint from this web application. |
| public void | removeErrorPage(ErrorPage
The error page definition to be removed errorPage)Implements org. 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. 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. Remove a filter mapping from this Context. |
| public void | removeMessageDestination(String
Name of the message destination to remove name)Remove any message destination with the specified name. |
| public void | removeMimeMapping(String
Extension to remove the mapping for extension)Implements org. Remove the MIME mapping for the specified extension, if it exists; otherwise, no action is taken. |
| public void | removeNotificationListener(NotificationListener
A listener that was previously added to this
MBean. listener, NotificationFilter The filter that was specified when the listener
was added. filter, Object The handback that was specified when the listener was
added. object)Implements javax. Remove a JMX notificationListener |
| public void | removeNotificationListener(NotificationListener
A listener that was previously added to this
MBean. listener)Implements javax. Remove a JMX-NotificationListener |
| public void | removeParameter(String
Name of the parameter to remove name)Implements org. 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. 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. Removes the pre destroy method definition for the given class, if it exists; otherwise, no action is taken. |
| public void | removeRoleMapping(String
Security role (as used in the application) to remove role)Implements org. Remove any security role reference for the specified name |
| public void | removeSecurityRole(String
Security role to remove role)Implements org. Remove any security role with the specified name. |
| public void | removeServletMapping(String
URL pattern of the mapping to remove pattern)Implements org. 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. 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. 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. 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. Remove a class name from the set of ContainerListener classes that will be added to newly created Wrappers. |
| private void | |
| public void | |
| public boolean | |
| public void | setAddWebinfClassesResources(boolean
The new value for the flag addWebinfClassesResources)Implements org. 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.Implements org. Set to |
| public void | setAllowMultipleLeadingForwardSlashInPath(boolean
The new value for the flag allowMultipleLeadingForwardSlashInPath)Implements org. Configure if, when returning a context path from |
| public void | setAltDDName(String
The new name altDDName)Implements org. Set an alternate Deployment Descriptor name. |
| public void | setAlwaysAccessSession(boolean
the new flag value alwaysAccessSession)Implements org. Set the session access behavior. |
| public void | setAntiResourceLocking(boolean
The new flag value antiResourceLocking)Set the antiResourceLocking feature for this Context. |
| public void | setApplicationEventListeners(Object[]
The set of instantiated listener objects. listeners)Implements org. 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. 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 | setCharsetMapper(CharsetMapper
The new mapper mapper)Set the Locale to character set mapper for this Context. |
| public void | setCharsetMapperClass(String
The new mapper class mapper)Set the Locale to character set mapper class for this Context. |
| public void | setClearReferencesHttpClientKeepAliveThread(boolean
The new flag value clearReferencesHttpClientKeepAliveThread)Set the clearReferencesHttpClientKeepAliveThread feature for this Context. |
| public void | |
| public void | |
| public void | setClearReferencesStopThreads(boolean
The new flag value clearReferencesStopThreads)Set the clearReferencesStopThreads feature for this Context. |
| public void | setClearReferencesStopTimerThreads(boolean
The new flag value clearReferencesStopTimerThreads)Set the clearReferencesStopTimerThreads feature for this Context. |
| public void | |
| public void | setConfigFile(URL
The URL of the XML descriptor for this context. configFile)Implements org. Set the URL of the XML descriptor for this context. |
| public void | setConfigured(boolean
The new correctly configured flag configured)Implements org. 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. 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. Allow using |
| public void | setCookieProcessor(CookieProcessor
The new cookie processor cookieProcessor)Implements org. Sets the |
| public void | setCookies(boolean
The new flag cookies)Implements org. Set the "use cookies for session ids" flag. |
| public void | setCopyXML(boolean
the new flag value copyXML)Allows copying a bundled context.xml file to the host configuration base folder on deployment. |
| public void | setCreateUploadTargets(boolean
true if Tomcat should attempt to
create the upload target, otherwise falseImplements org. 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. Set the "allow crossing servlet contexts" flag. |
| public void | setDefaultContextXml(String
The default web xml defaultContextXml)Set the location of the default context xml that will be used. |
| public void | setDefaultWebXml(String
The default web xml defaultWebXml)Set the location of the default web xml that will be used. |
| public void | setDelegate(boolean
The new flag delegate)Set the "follow standard delegation model" flag used to configure our ClassLoader. |
| public void | setDenyUncoveredHttpMethods(boolean
The new deny-uncovered-http-methods flag denyUncoveredHttpMethods)Implements org. Set the deny-uncovered-http-methods flag for this web application. |
| public void | setDispatchersUseEncodedPaths(boolean
true to use encoded paths,
otherwise falseImplements org. 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. Allow disabling the object wrap check in the request dispatcher. |
| public void | setDisplayName(String
The new display name displayName)Implements org. Set the display name of this web application. |
| public void | setDistributable(boolean
The new distributable flag distributable)Implements org. Set the distributable flag for this web application. |
| public void | setDocBase(String
The new document root docBase)Implements org. Set the document root for this Context. |
| public void | setEffectiveMajorVersion(int
Set the version number effectiveMajorVersion)Implements org. Set the effective major version of the Servlet spec used by this context. |
| public void | setEffectiveMinorVersion(int
Set the version number effectiveMinorVersion)Implements org. Set the effective minor version of the Servlet spec used by this context. |
| public void | |
| public void | setFireRequestListenersOnForwards(boolean
true to fire request listeners when forwardingImplements org. 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. Set the boolean on the annotations parsing for this web application. |
| public void | setInstanceManager(InstanceManager
the new instance manager instance instanceManager)Implements org. Set the instance manager associated with this context. |
| public void | |
| public void | |
| public void | setJarScanner(JarScanner
The Jar Scanner to be used for this context. jarScanner)Implements org. Set the Jar Scanner to be used to scan for JAR resources for this context. |
| public void | setJndiExceptionOnFailedWrite(boolean
false to avoid an exceptionControls whether or not an attempt to modify the JNDI context will trigger an exception or if the request will be ignored. |
| public void | setJspConfigDescriptor(JspConfigDescriptor
the new JSP configuration descriptor)Implements org. Set the JspConfigDescriptor for this context. |
| public void | setLoader(Loader
The newly associated loader loader)Implements org. Set the Loader with which this Context is associated. |
| public void | setLogEffectiveWebXml(boolean
set to logEffectiveWebXml)true to log the complete
web.xml that will be used for the webappImplements org. 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. Set the login configuration descriptor for this web application. |
| public void | setManager(Manager
The newly associated Manager manager)Implements org. Set the Manager with which this Context is associated. |
| public void | setMapperContextRootRedirectEnabled(boolean
Should the redirects be enabled? mapperContextRootRedirectEnabled)Implements org. 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. If enabled, requests for a directory will be redirected (adding a trailing slash) by the Mapper. |
| public void | setNamingContextListener(NamingContextListener
the new naming context listener namingContextListener)Naming context listener setter. |
| public void | setNamingResources(NamingResourcesImpl
The new naming resources namingResources)Implements org. Set the naming resources for this web application. |
| public void | setOriginalDocBase(String
The original document root docBase)Set the original document root for this Context. |
| public void | setOverride(boolean
The new override flag override)Implements org. Set the default context override flag for this web application. |
| public void | setParallelAnnotationScanning(boolean
new parallel annotation scanning flag parallelAnnotationScanning)Implements org. Set the parallel annotation scanning value. |
| public void | setPath(String
The new context path path)Implements org. Set the context path for this Context. |
| private void | setPaused(boolean
The new request processing paused flag paused)Set the request processing paused flag for this Context. |
| public void | setPreemptiveAuthentication(boolean
true to perform authentication even outside
security constraintsImplements org. 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. Set the privileged flag for this web application. |
| public void | setPublicId(String
The public identifier publicId)Implements org. Set the public identifier of the deployment descriptor DTD that is currently being parsed. |
| public void | setReloadable(boolean
The new reloadable flag reloadable)Implements org. Set the reloadable flag for this web application. |
| public void | |
| public void | setReplaceWelcomeFiles(boolean
The new property value replaceWelcomeFiles)Set the "replace welcome files" property. |
| public void | setRequestCharacterEncoding(String
The default encoding requestEncoding)Implements org. Set the default request body encoding for this web application. |
| public void | setResourceOnlyServlets(String
The Servlet names comma separated list resourceOnlyServlets)Implements org. 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. Set the Resources object with which this Context is associated. |
| public void | setResponseCharacterEncoding(String
The default encoding responseEncoding)Implements org. Set the default response body encoding for this web application. |
| public void | setSendRedirectBody(boolean
true to send a response body for redirectsImplements org. Configures if a response body is included when a redirect response is sent to the client. |
| public String | |
| public void | setSessionCookieDomain(String
The domain to use sessionCookieDomain)Implements org. Sets the domain to use for session cookies. |
| public void | setSessionCookieName(String
The name to use sessionCookieName)Implements org. Sets the name to use for session cookies. |
| public void | setSessionCookiePath(String
The path to use sessionCookiePath)Implements org. Sets the path to use for session cookies. |
| public void | setSessionCookiePathUsesTrailingSlash(boolean
true if the
slash is should be added,
otherwise falseImplements org. 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. Set the default session timeout (in minutes) for this web application. |
| public void | |
| public void | |
| public void | setSwallowAbortedUploads(boolean
false to disable swallowing, true otherwise (default).Implements org. Set to |
| public void | setSwallowOutput(boolean
The new value swallowOutput)Implements org. 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. Get the associated ThreadBindingListener. |
| public void | |
| public void | setTldValidation(boolean
true to enable xml validation tldValidation)Implements org. Controls whether the parsing of *.tld files for this Context will be performed by a validating parser. |
| public void | setUnloadDelay(long
The new value unloadDelay)Set the value of the unloadDelay flag, which represents the amount of ms that the container will wait when unloading servlets. |
| public void | |
| public void | setUseBloomFilterForArchives(boolean
The new fast class path scan flag useBloomFilterForArchives)Implements org.
Deprecated
Set bloom filter flag value. |
| public void | setUseHttpOnly(boolean
Set to useHttpOnly)true to use HttpOnly cookies for session cookiesImplements org. Sets the use HttpOnly cookies for session cookies flag. |
| public void | |
| public void | setUsePartitioned(boolean
true if the Partitioned attribute should be added to session cookies
created for this web application, otherwise falseImplements org. Configure whether the |
| public void | setUseRelativeRedirects(boolean
true to use relative redirects and
false to use absolute redirectsImplements org. Controls whether HTTP 1.1 and later location headers generated by a call
to |
| public void | setValidateClientProvidedNewSessionId(boolean
true if validation should be appliedImplements org. 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. Set the version of this web application - used to differentiate different versions of the same web application when using parallel deployment. |
| public void | |
| public void | setWrapperClass(String
The new wrapper class name wrapperClassName)Implements org. 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. 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 webXmlNamespaceAware)Implements org. 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 webXmlValidation)Implements org. 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()
Overrides org. Start this component and implement the requirements of
|
| protected void | stopInternal()
Overrides org. Stop this component and implement the requirements of
|
| public void | unbind(boolean
Should a usePrivilegedAction, ClassLoader java. be used when
setting the current thread context class loader?The class loader to restore as the thread context class loader originalClassLoader)Implements org. Restore the current thread context class loader to the original class
loader in used before |
| protected void | unbindThread(ClassLoader
the previous classloader oldContextClassLoader)Unbind thread and restore the specified context classloader. |
| private void | |
| private boolean | Returns: true if the URL pattern is conformantURL pattern to be validated urlPattern)Validate the syntax of a proposed |
| public boolean |