Is it possible to turn off taglib scanning in Tomcat?

Matt Passell picture Matt Passell · Sep 29, 2009 · Viewed 13.6k times · Source

On startup, Tomcat recursively scans the WEB-INF directories for TLD (Tag Library Descriptor) files. As a result, if a webapp has a lot of files under that directory, it slows down the startup process. Does anyone know if there is a way in that situation to turn off scanning completely, or at least provide a filter to narrow the search?

Answer

ZZ Coder picture ZZ Coder · Sep 29, 2009

You can add processTlds attributes in the context,

  <Context processTlds="false" ... />

However, your TLDs defined in the JAR file wouldn't work without scanning the JARs. You have to define all TLDs in WEB-INF.