code: public void scanJars() throws IOException {
  
          ClassLoader webappLoader = Thread.currentThread().getContextClassLoader();
  
          ClassLoader parentLoader = webappLoader.getParent();
  
          ResourceDelegatingBundleClassLoader classLoader = null;
          if (webappLoader instanceof ResourceDelegatingBundleClassLoader) {
              classLoader = (ResourceDelegatingBundleClassLoader) webappLoader;
          } else if (parentLoader instanceof ResourceDelegatingBundleClassLoader) {
              classLoader = (ResourceDelegatingBundleClassLoader) parentLoader;
          } else if (isTomcatWebLoader()) {
              ClassLoader parent = ((org.apache.catalina.loader.WebappClassLoader) webappLoader).getParent();
              if (parent instanceof ResourceDelegatingBundleClassLoader) {
                  classLoader = (ResourceDelegatingBundleClassLoader) parent;
              }
          }
  
          List<Bundle> bundles = classLoader == null ? Collections.<Bundle>emptyList() : classLoader.getBundles();
          for (Bundle bundle : bundles) {
              Collection<Enumeration<URL>> enumerations;
              BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
              if (bundleWiring == null) {
                  Enumeration<URL> urls = bundle.findEntries("META-INF", "*.tld", true);
                  enumerations = Collections.singleton(urls);
              } else {
                  Collection<String> resources = bundleWiring.listResources("META-INF", "*.tld",
                          BundleWiring.LISTRESOURCES_RECURSE);
                  enumerations = new ArrayList<>(resources.size());
                  for (String resource : resources) {
                      Enumeration<URL> urls = bundle.getResources(resource);
                      enumerations.add(urls);
                  }
              }
              for (Enumeration<URL> urls : enumerations) {
                  if (urls != null) {
                      while (urls.hasMoreElements()) {
                          URL url = urls.nextElement();
                          LOG.info("found TLD {}", url);
                          TldResourcePath tldResourcePath = new TldResourcePath(url, null, null);
                          try {
                              parseTld(tldResourcePath);
                          } catch (SAXException e) {
                              throw new IOException(e);
                          }
                      }
                  }
              }
          }
      }
docs: Scan for TLDs in JARs in /WEB-INF/lib.
  
  @throws IOException