The parent Container attached to a Context is generally a Host, but may be some other implementation, or may be omitted if it is not necessary.
The child containers attached to a Context are generally implementations of Wrapper (representing individual servlet definitions).
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ADD_WELCOME_FILE_EVENT
Container event for adding a welcome file. |
| public static final String | CHANGE_SESSION_ID_EVENT
Container event for changing the ID of a session. |
| public static final String | CLEAR_WELCOME_FILES_EVENT
Container event for clearing welcome files. |
| public static final String | REMOVE_WELCOME_FILE_EVENT
Container event for removing a wrapper. |
| public static final String | WEBAPP_PROTOCOL
Prefix for resource lookup. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addApplicationListener(String
Java class name of a listener class listener)Add a new Listener class name to the set of Listeners configured for this application. |
| public void | addApplicationParameter(ApplicationParameter
The new application parameter parameter)Add a new application parameter for this application. |
| public void | addConstraint(SecurityConstraint
The security constraint that should be added constraint)Add a security constraint to the set for this web application. |
| public void | addErrorPage(ErrorPage
The error page definition to be added errorPage)Add an error page for the specified error or Java exception. |
| public void | addFilterDef(FilterDef
The filter definition to be added filterDef)Add a filter definition to this Context. |
| public void | addFilterMap(FilterMap
The filter mapping to be added filterMap)Add a filter mapping to this Context. |
| public void | addFilterMapBefore(FilterMap
The filter mapping to be added filterMap)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)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)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)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)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)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)Add a security role reference for this web application. |
| public void | |
| public void | addServletContainerInitializer(ServletContainerInitializer
The instance to add sci, Set<Class<?>> The classes in which the initializer expressed an
interest classes)Add a ServletContainerInitializer instance to this web application. |
| public default void | addServletMappingDecoded(String
URL pattern to be mapped pattern, String Name of the corresponding servlet to execute name)Add a new servlet mapping, replacing any existing mapping for the specified pattern. |
| 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)Add a new servlet mapping, replacing any existing mapping for the specified pattern. |
| public Set | Returns: urls currently mapped to this registration that are already present in web.xmlServlet security was modified for registration,new security constraints for this Servlet servletSecurityElement)Notification that Servlet security has been dynamically set in a
|
| public void | addWatchedResource(String
Path to the resource, relative to docBase name)Add a resource which will be watched for reloading by the host auto deployer. |
| public void | addWelcomeFile(String
New welcome file name name)Add a new welcome file to the set recognized by this Context. |
| public void | addWrapperLifecycle(String
Java class name of a LifecycleListener class listener)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)Add the classname of a ContainerListener to be added to each Wrapper appended to this Context. |
| public InstanceManager | Returns: the instance managerFactory method to create and return a new InstanceManager instance. |
| public Wrapper | Returns: a newly created wrapper instance that is used to wrap a ServletFactory method to create and return a new Wrapper instance, of the Java implementation class appropriate for this Context implementation. |
| public void | |
| public String[] | Returns: the set of application listener class names configured for this application.
|
| public ApplicationParameter[] | |
| public default ConfigurationSource. | Returns: the resourceThe resource name name)Find configuration file with the specified path, first looking into the
webapp resources, then delegating to
|
| public SecurityConstraint[] | Returns: the set of security constraints for this web application. If there are none, a zero-length array is returned.
|
| public ErrorPage | Returns: the error page entry for the specified HTTP error code, if any; otherwise returnnull.Error code to look up errorCode)
|
| public ErrorPage | Returns: the error page entry for the specified Java exception type, if any; otherwise returnnull.The exception type for which to find an ErrorPage throwable)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[] | Returns: the set of defined error pages for all specified error codes and exception types.
|
| public FilterDef | Returns: the filter definition for the specified filter name, if any; otherwise returnnull.Filter name to look up filterName)
|
| public FilterDef[] | |
| public FilterMap[] | |
| 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)
|
| public String[] | Returns: the extensions for which MIME mappings are defined. If there are none, a zero-length array is returned.
|
| public String | Returns: the value for the specified context initialization parameter name, if any; otherwise returnnull.Name of the parameter to return name)
|
| 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.
|
| public String | Returns: the method name that is specified as post construct method for the given class, if it exists; otherwiseNULL will
be returned.Fully qualified class name clazz)Returns the method name that is specified as post construct method for
the given class, if it exists; otherwise |
| public Map | 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.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 | Returns: the method name that is specified as pre destroy method for the given class, if it exists; otherwiseNULL will be
returned.Fully qualified class name clazz)Returns the method name that is specified as pre destroy method for the
given class, if it exists; otherwise |
| public Map | 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.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 name that was mapped to the specified roleSecurity role to map role)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)
|
| public String[] | Returns: the security roles defined for this application. If none have been defined, a zero-length array is returned.
|
| public String | Returns: the servlet name mapped by the specified pattern (if any); otherwise returnnull.Pattern for which a mapping is requested pattern)
|
| public String[] | Returns: the patterns of all defined servlet mappings for this Context. If no mappings are defined, a zero-length array is returned.
|
| public String[] | Returns: the set of watched resources for this Context. If none are defined, a zero length array will be returned.
|
| public boolean | Returns: true if the specified welcome file is defined
for this Context; otherwise return false.Welcome file to verify name)
|
| public String[] | Returns: the set of welcome files defined for this Context. If none are defined, a zero-length array is returned.
|
| public String[] | Returns: the set of LifecycleListener classes that will be added to newly created Wrappers automatically.
|
| public String[] | Returns: the set of ContainerListener classes that will be added to newly created Wrappers automatically.
|
| public boolean | Returns: true if the listeners fire successfully, else
falseThe request object that will be passed to the listener request)Notify all |
| public boolean | Returns: true if the listeners fire successfully, else
falseThe request object that will be passed to the listener request)Notify all |
| public boolean | Returns: 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 boolean | Returns: true if requests mapped to servlets without
"multipart config" to parse multipart/form-data requests,
false otherwise.Returns |
| public boolean | Returns: true if multiple leading '/' characters are allowed,
otherwise falseWhen returning a context path from |
| public String | |
| public boolean | Returns: the flag valueIf this is |
| public Object[] | Returns: An array containing the application event listener instances for this web application in the order they were specified in the web application deployment descriptorObtain the registered application event listeners. |
| public Object[] | Returns: An array containing the application lifecycle listener instances for this web application in the order they were specified in the web application deployment descriptorObtain the registered application lifecycle listeners. |
| public Authenticator | Returns: theAuthenticator that is used by this context. This is
always non-null for a started Context
|
| public String | Returns: the base name to use for WARs, directories or context.xml files for this context.
|
| public String | Returns: The name of the character set to use with the given LocaleThe locale for which the mapped character set should be
returned locale)Obtain the character set name to use with the given Locale. |
| public URL | Returns: The URL of the XML descriptor for this contextReturn the URL of the XML descriptor for this context. |
| public boolean | Returns: true if the Context has been correctly configured,
otherwise falseReturn the "correctly configured" flag for this Context. |
| public String | Returns: The regular expression against which the fully qualified class name of each container provided SCI will be checkedObtains the regular expression that specifies which container provided SCIs should be filtered out and not used for this context. |
| public boolean | Returns: the flag valueIf this is |
| public CookieProcessor | Returns: theCookieProcessor that will be used to process cookies
for this Context.
|
| public boolean | Returns: true if it is permitted to use cookies to track
session IDs for this web application, otherwise
falseReturn the "use cookies for session ids" flag. |
| public boolean | Returns: true if Tomcat will attempt to create an upload target
otherwise falseWill 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 | Returns: true if cross-contest requests are allowed from this
web applications, otherwise falseReturn the "allow crossing servlet contexts" flag. |
| public boolean | Returns: The current value of the flagReturn the deny-uncovered-http-methods flag for this web application. |
| public boolean | Returns: true if encoded paths will be used, otherwise
falseAre paths used in calls to obtain a request dispatcher expected to be encoded? |
| public boolean | Returns: the flag valueIf this is |
| public String | |
| public boolean | Returns: The value of the distributable flag for this web application.Get the distributable flag for this web application. |
| public String | Returns: An absolute pathname or a relative (to the Host's appBase) pathname.Obtain the document root for this Context. |
| public int | Returns: the effective major version of the Servlet spec used by this context.
|
| public int | Returns: the effective minor version of the Servlet spec used by this context.
|
| public String | Returns: The URL encoded (with UTF-8) context pathReturn the URL encoded context path |
| public boolean | Returns: whether or not requests listeners will be fired on forwards for this Context.
|
| public boolean | Returns: true if annotation parsing is disabled for this web
applicationDetermine if annotations parsing is currently disabled |
| public InstanceManager | |
| public JarScanner | Returns: The Jar Scanner configured for this context.Get the Jar Scanner to be used to scan for JAR resources for this context. |
| public JspConfigDescriptor | Returns: the JSP configuration for this context. Will be null if there is no JSP configuration.
|
| public Loader | |
| public boolean | Returns: true if the reconstructed web.xml that will be used for the webapp should be loggedShould the effective web.xml for this context be logged on context start? |
| public LoginConfig | |
| public Manager | Returns: the Manager with which this Context is associated. If there is no associated Manager, returnnull.
|
| public boolean | Returns: true if the Mapper level redirect is enabled for this
Context.Determines if requests for a web application context root will be redirected (adding a trailing slash) by the Mapper. |
| public boolean | Returns: true if the Mapper level redirect is enabled for this
Context.Determines if requests for a directory will be redirected (adding a trailing slash) by the Mapper. |
| public NamingResourcesImpl | |
| public Object | |
| public boolean | |
| public boolean | Returns: the value of the parallel annotation scanning flag. If true, it will dispatch scanning to the utility executor.
|
| public String | |
| public boolean | Returns: true if the context has been pausedIs this Context paused whilst it is reloaded? |
| public boolean | Returns: if a user presents authentication credentials, will the context will process them when the request is for a non-protected resource.
|
| public boolean | |
| public String | Returns: the public identifier of the deployment descriptor DTD that is currently being parsed.
|
| public String | Returns: the real path for a given virtual path, if possible; otherwise returnnull.The path to the desired resource path)
|
| public boolean | |
| public String | Returns: The default request body encodingGet the default request body encoding for this web application. |
| public String | Returns: A comma separated list of Servlet names as used in web.xmlObtains the list of Servlets that expect a resource to be present. |
| public WebResourceRoot | |
| public String | Returns: The default response body encodingGet the default response body encoding for this web application. |
| public boolean | Returns: if the context is configured to include a response body as part of a redirect response.
|
| public ServletContext | |
| public String | Returns: The value of the default session cookie domain or null if not specifiedGets the domain to use for session cookies. |
| public String | Returns: The value of the default session cookie name or null if not specifiedGets the name to use for session cookies. |
| public String | Returns: The value of the default session cookie path or null if not specifiedGets the path to use for session cookies. |
| public boolean | Returns: true if the slash is added, otherwise
falseIs 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 boolean | Returns: true if data will be swallowed (default),
false otherwise.Returns |
| public boolean | |
| public ThreadBindingListener | |
| public boolean | Returns: true if validation is enabled.Will the parsing of *.tld files for this Context be performed by a validating parser? |
| public boolean | Returns: true if the resources archive lookup will
use a bloom filter.
Deprecated
This method will be removed in Tomcat 11 onwards.
Use
WebResourceRoot#getArchiveIndexStrategy()
|
| public boolean | Returns: true if the HttpOnly flag should be set on session
cookiesGets the value of the use HttpOnly cookies for session cookies flag. |
| public boolean | Returns: true if the Partitioned attribute should be added to session cookies created for this web
application, otherwise falseShould the |
| public boolean | Returns: true if relative redirects will be used false if
absolute redirects are used.Will HTTP 1.1 and later location headers generated by a call to
|
| public boolean | Returns: true if validation will be applied. Otherwise, falseWill client provided session IDs be validated (see |
| public String | Returns: The version of this web application, used to differentiate different versions of the same web application when using parallel deployment. If not specified, defaults to the empty string.
|
| public String | Returns: the Java class name of the Wrapper implementation used for servlets registered in this Context.
|
| public boolean | Returns: true if access to external entities is blockedWill 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 | Returns: true if namespace awareness is enabled.Will the parsing of web.xml and web-fragment.xml files for this Context be performed by a namespace aware parser? |
| public boolean | Returns: true if validation is enabled.Will the parsing of web.xml and web-fragment.xml files for this Context be performed by a validating parser? |
| public void | |
| public default boolean | Returns: the value of the parallel annotation scanning flag. If true, it will dispatch scanning to the utility executor.
Deprecated
This method will be removed in Tomcat 11 onwards
|
| public boolean | Returns: true if the Servlet expects a resource,
otherwise falseName of the Servlet (as per web.xml) to check servletName)Checks the named Servlet to see if it expects a resource to be present. |
| public boolean | Returns: true for a legacy Servlet 2.2 webappIs this context using version 2.2 of the Servlet spec? |
| public void | |
| public void | removeApplicationListener(String
Java class name of the listener to be removed listener)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)Remove the application parameter with the specified name from the set for this application. |
| public void | removeConstraint(SecurityConstraint
Constraint to be removed constraint)Remove the specified security constraint from this web application. |
| public void | removeErrorPage(ErrorPage
The error page definition to be removed errorPage)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)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)Remove a filter mapping from this Context. |
| public void | removeMimeMapping(String
Extension to remove the mapping for extension)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)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)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)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)Remove any security role reference for the specified name |
| public void | removeSecurityRole(String
Security role to remove role)Remove any security role with the specified name. |
| public void | removeServletMapping(String
URL pattern of the mapping to remove pattern)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)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)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)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)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)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.Set to |
| public void | setAllowMultipleLeadingForwardSlashInPath(boolean
The new value for the flag allowMultipleLeadingForwardSlashInPath)Configure if, when returning a context path from |
| public void | |
| public void | setAlwaysAccessSession(boolean
the new flag value alwaysAccessSession)Set the session access behavior. |
| public void | setApplicationEventListeners(Object[]
The set of instantiated listener objects. listeners)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)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 | setConfigFile(URL
The URL of the XML descriptor for this context. configFile)Set the URL of the XML descriptor for this context. |
| public void | setConfigured(boolean
The new correctly configured flag configured)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)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)Allow using |
| public void | setCookieProcessor(CookieProcessor
The new cookie processor cookieProcessor)Sets the |
| public void | |
| public void | setCreateUploadTargets(boolean
true if Tomcat should attempt to
create the upload target, otherwise falseConfigure 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)Set the "allow crossing servlet contexts" flag. |
| public void | setDenyUncoveredHttpMethods(boolean
The new deny-uncovered-http-methods flag denyUncoveredHttpMethods)Set the deny-uncovered-http-methods flag for this web application. |
| public void | setDispatchersUseEncodedPaths(boolean
true to use encoded paths,
otherwise falseAre paths used in calls to obtain a request dispatcher expected to be encoded? |
| public void | setDispatcherWrapsSameObject(boolean
the new flag value dispatcherWrapsSameObject)Allow disabling the object wrap check in the request dispatcher. |
| public void | |
| public void | setDistributable(boolean
The new distributable flag distributable)Set the distributable flag for this web application. |
| public void | |
| public void | setEffectiveMajorVersion(int
Set the version number major)Set the effective major version of the Servlet spec used by this context. |
| public void | setEffectiveMinorVersion(int
Set the version number minor)Set the effective minor version of the Servlet spec used by this context. |
| public void | setFireRequestListenersOnForwards(boolean
true to fire request listeners when forwardingConfigure whether or not requests listeners will be fired on forwards for this Context. |
| public void | setIgnoreAnnotations(boolean
The boolean on the annotations parsing ignoreAnnotations)Set the boolean on the annotations parsing for this web application. |
| public void | setInstanceManager(InstanceManager
the new instance manager instance instanceManager)Set the instance manager associated with this context. |
| public void | setJarScanner(JarScanner
The Jar Scanner to be used for this context. jarScanner)Set the Jar Scanner to be used to scan for JAR resources for this context. |
| public void | setJspConfigDescriptor(JspConfigDescriptor
the new JSP configuration descriptor)Set the JspConfigDescriptor for this context. |
| public void | |
| public void | setLogEffectiveWebXml(boolean
set to logEffectiveWebXml)true to log the complete
web.xml that will be used for the webappSet 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)Set the login configuration descriptor for this web application. |
| public void | setManager(Manager
The newly associated Manager manager)Set the Manager with which this Context is associated. |
| public void | setMapperContextRootRedirectEnabled(boolean
Should the redirects be enabled? mapperContextRootRedirectEnabled)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)If enabled, requests for a directory will be redirected (adding a trailing slash) by the Mapper. |
| public void | setNamingResources(NamingResourcesImpl
The new naming resources namingResources)Set the naming resources for this web application. |
| public void | |
| public void | setParallelAnnotationScanning(boolean
new parallel annotation scanning flag parallelAnnotationScanning)Set the parallel annotation scanning value. |
| public void | |
| public void | setPreemptiveAuthentication(boolean
true to perform authentication even outside
security constraintsConfigures 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)Set the privileged flag for this web application. |
| public void | setPublicId(String
The public identifier publicId)Set the public identifier of the deployment descriptor DTD that is currently being parsed. |
| public void | setReloadable(boolean
The new reloadable flag reloadable)Set the reloadable flag for this web application. |
| public void | setRequestCharacterEncoding(String
The default encoding encoding)Set the default request body encoding for this web application. |
| public void | setResourceOnlyServlets(String
The Servlet names comma separated list resourceOnlyServlets)Sets the (comma separated) list of Servlets that expect a resource to be present. |
| public void | setResources(WebResourceRoot
The newly associated Resources resources)Set the Resources object with which this Context is associated. |
| public void | setResponseCharacterEncoding(String
The default encoding encoding)Set the default response body encoding for this web application. |
| public void | setSendRedirectBody(boolean
true to send a response body for redirectsConfigures if a response body is included when a redirect response is sent to the client. |
| public void | setSessionCookieDomain(String
The domain to use sessionCookieDomain)Sets the domain to use for session cookies. |
| public void | setSessionCookieName(String
The name to use sessionCookieName)Sets the name to use for session cookies. |
| public void | setSessionCookiePath(String
The path to use sessionCookiePath)Sets the path to use for session cookies. |
| public void | setSessionCookiePathUsesTrailingSlash(boolean
true if the
slash is should be added,
otherwise falseConfigures 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)Set the default session timeout (in minutes) for this web application. |
| public void | setSwallowAbortedUploads(boolean
false to disable
swallowing, true otherwise (default).Set to |
| public void | |
| public void | setThreadBindingListener(ThreadBindingListener
Set the listener that will receive
notifications when entering and exiting the application scope threadBindingListener)Get the associated ThreadBindingListener. |
| public void | setTldValidation(boolean
true to enable xml validation tldValidation)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)
Deprecated
This method will be removed in Tomcat 11 onwards
Use
WebResourceRoot#setArchiveIndexStrategy(String)
Set bloom filter flag value. |
| public void | setUseHttpOnly(boolean
Set to useHttpOnly)true to use HttpOnly cookies
for session cookiesSets 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 falseConfigure whether the |
| public void | setUseRelativeRedirects(boolean
true to use relative redirects and
false to use absolute redirectsControls whether HTTP 1.1 and later location headers generated by a call
to |
| public void | setValidateClientProvidedNewSessionId(boolean
true if validation should be appliedWhen 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)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)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)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)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)Controls whether the parsing of web.xml and web-fragment.xml files for this Context will be performed by a validating parser. |