6

In catalina.properties it says:

# List of JAR files that should not be scanned for configuration information
# such as web fragments, TLD files etc. It must be a comma separated list of
# JAR file names.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Sun JDK JARs
# - Apple JDK JARs
tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\

Can anyone explain WHY? For example, you have to include the jstl.jar in your libs, but if it's called jstl.jar, it skips it. I just don't understand what the point of skipping it is in the first place?

0

1 Answer 1

13

The comment says it all: "files that should not be scanned for configuration information" ie. if you know that your jars don't have any configuration information, include them here, so tomcat won't look into it.

The bottom line is this: it will cut the time tomcat takes to finish booting.

It seems not very useful on small deployments, but believe me: it does make a huge difference in big deployments with hundreds of jar files.

If jars are not included, or if there is not a pattern to skip (such as a*.jar - to exclude everything that starts with "a"), then everything gets opened, read, to find out about configuration.

In the company I work for, we are using TC Server which is just a fancy Tomcat: without the patterns to skip jars, tc server takes about 20 minutes just to scan the jar files... then another 10 minutes to deploy everything.

When we added patterns to skip pretty much 99% , we were able to cut down the server startup to about 12 minutes - not perfect, but the whole thing is huge, therefore, it's a tradeof we accepted.

2
  • I understand the reason to include a jar in this property but jstl.jar contains configuration information. By default, it is included in this property. I don't understand the reason for it being added by tomcat/apache.
    – Manoj
    May 13, 2016 at 12:13
  • 1
    And I don't understand this "magic" configuration information. If some of the jars have configuration information why not list them explicitly. I google around for "configuration information in jars" and don't find anything much appropriate except some stuff about code signing.
    – Marvin
    Sep 20, 2019 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.