The Jar Scan Filter Component
Table of Contents
Introduction
The Jar Scan Filter element represents the component that filters results from the Jar Scanner before they are passed back to the application. It is typically used to skip the scanning of JARs that are known not to be relevant to some or all types of scan.
A Jar Scan Filter element MAY be nested inside a Jar Scanner component.
For example you can specify additional jar files when scanning for pluggable features:
<Context>
...
<JarScanner>
<JarScanFilter
pluggabilityScan="${tomcat.util.scan.StandardJarScanFilter.jarsToScan},
my_pluggable_feature.jar"/>
</JarScanner>
...
</Context>
If a Jar Scan Filter element is not included, a default Jar Scan Filter configuration will be created automatically, which is sufficient for most requirements.
Attributes
Common Attributes
All implementations of Jar Scan Filter support the following attributes:
Attribute | Description |
---|---|
className |
Java class name of the implementation to use. This class must
implement the |
Standard Implementation
The standard implementation of Jar Scan Filter is org.apache.tomcat.util.scan.StandardJarScanFilter. It supports the following additional attributes (in addition to the common attributes listed above):
Attribute | Description |
---|---|
tldSkip |
The comma separated list of JAR file and / or directory name patterns
to skip when scanning for TLDs. If not specified, the default is obtained
from the |
tldScan |
The comma separated list of JAR file and / or directory name patterns
to scan when scanning for TLDs. If not specified, the default is obtained
from the |
defaultTldScan |
Controls if JARs are scanned or skipped by default. If
|
pluggabilitySkip |
The comma separated list of JAR file and / or directory name patterns
to skip when scanning for pluggable features. If not specified, the
default is obtained from the
|
pluggabilityScan |
The comma separated list of JAR file and / or directory name patterns
to scan when scanning for pluggable features. If not specified, the
default is obtained from the
|
defaultPluggabilityScan |
Controls if JARs are scanned or skipped by default. If
|
Note that excluding a JAR from the pluggability scan will prevent a
ServletContainerInitializer from being loaded from a web application JAR
(i.e. one located in /WEB-INF/lib
) but it will not prevent
a ServletContainerInitializer from being loaded from the container. To
prevent a ServletContainerInitializer from being loaded from the container,
use the containerSciFilter
property of the Context.
Nested Components
No components may be nested inside a Jar Scanner element.
Special Features
No special features are associated with a Jar Scanner element.