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

public Class ExtractingRoot

extends StandardRoot
Class Inheritance
Imports
java.io.File, .FileOutputStream, .IOException, .InputStream, .OutputStream, jakarta.servlet.ServletContext, org.apache.catalina.LifecycleException, .WebResource, org.apache.catalina.startup.ExpandWar, org.apache.catalina.util.IOTools, org.apache.tomcat.util.res.StringManager

If the main resources are packaged as a WAR file then any JARs will be extracted to the work directory and used from there.

Field Summary

Modifier and TypeField and Description
private static final String
private static final StringManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private File
protected boolean
protected void
processWebInfLib()

Overrides org.apache.catalina.webresources.StandardRoot.processWebInfLib.

Class loader resources are handled by treating JARs in WEB-INF/lib as resource JARs (without the internal META-INF/resources/ prefix) mounted at WEB-INF/classes (rather than the web app root).

protected void
stopInternal()

Overrides org.apache.catalina.webresources.StandardRoot.stopInternal.

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

Inherited from org.apache.catalina.webresources.StandardRoot:
addClassResourcesaddJarResourcesaddPostResourcesaddPreResourcesbackgroundProcesscreateMainResourceSetcreateWebResourceSetcreateWebResourceSetderegisterTrackedResourcedestroyInternalgcgetAllowLinkinggetArchiveIndexStrategygetArchiveIndexStrategyEnumgetBaseUrlsgetCacheMaxSizegetCacheObjectMaxSizegetCacheStrategygetCacheTtlgetClassLoaderResourcegetClassLoaderResourcesgetClassResourcesgetContextgetDomainInternalgetJarResourcesgetObjectNameKeyPropertiesgetPostResourcesgetPreResourcesgetResourcegetResourcegetResourceInternalgetResourcesgetResourcesInternalgetTrackedResourcesgetTrackLockedFilesinitInternalisCachingAllowedlistlistResourceslistResourceslistWebAppPathsmkdirregisterTrackedResourceregisterURLStreamHandlerFactorysetAllowLinkingsetArchiveIndexStrategysetCacheMaxSizesetCacheObjectMaxSizesetCacheStrategysetCacheTtlsetCachingAllowedsetContextsetMainResourcessetTrackLockedFilesstartInternalwrite

Field Detail

APPLICATION_JARS_DIRback to summary
private static final String APPLICATION_JARS_DIR
smback to summary
private static final StringManager sm

Hides org.apache.catalina.webresources.StandardRoot.sm.

Constructor Detail

ExtractingRootback to summary
public ExtractingRoot()

Method Detail

getExpansionTargetback to summary
private File getExpansionTarget()
isPackedWarFileback to summary
protected boolean isPackedWarFile()

Overrides org.apache.catalina.webresources.StandardRoot.isPackedWarFile.

Annotations
@Override
processWebInfLibback to summary
protected void processWebInfLib() throws LifecycleException

Overrides org.apache.catalina.webresources.StandardRoot.processWebInfLib.

Doc from org.apache.catalina.webresources.StandardRoot.processWebInfLib.

Class loader resources are handled by treating JARs in WEB-INF/lib as resource JARs (without the internal META-INF/resources/ prefix) mounted at WEB-INF/classes (rather than the web app root). This enables reuse of the resource handling plumbing. These resources are marked as class loader only so they are only used in the methods that are explicitly defined to return class loader resources. This prevents calls to getResource("/WEB-INF/classes") returning from one or more of the JAR files.

Annotations
@Override
Exceptions
LifecycleException:
If an error occurs that should stop the web application from starting
stopInternalback to summary
protected void stopInternal() throws LifecycleException

Overrides org.apache.catalina.webresources.StandardRoot.stopInternal.

Doc from org.apache.catalina.util.LifecycleBase.stopInternal.

Sub-classes must ensure that the state is changed to LifecycleState#STOPPING during the execution of this method. Changing state will trigger the Lifecycle#STOP_EVENT event.

Annotations
@Override
Exceptions
LifecycleException:
Stop error occurred