--- org/apache/tomcat/util/scan/JarFactory.java	2021-01-01 00:00:00.000000000 +0000
+++ org/apache/tomcat/util/scan/JarFactory.java.new	2021-01-01 00:00:00.000000000 +0000
@@ -33,7 +33,6 @@
         // Factory class. Hide public constructor.
     }
 
-
     public static Jar newInstance(URL url) throws IOException {
         String urlString = url.toString();
         if (urlString.startsWith("jar:file:")) {
@@ -48,6 +47,10 @@
         } else if (urlString.startsWith("file:")) {
             return new JarFileUrlJar(url, false);
         } else {
+            Jar specificNewInstance = TomcatUtilScanControllerHandler.getTomcatController().specificNewInstance(url);
+            if (specificNewInstance != null) {
+                return specificNewInstance;
+            }
             return new UrlJar(url);
         }
     }
@@ -56,6 +59,11 @@
     public static URL getJarEntryURL(URL baseUrl, String entryName)
             throws MalformedURLException {
 
+        URL url = TomcatUtilScanControllerHandler.getTomcatController().getJarEntryURL(baseUrl, entryName);
+        if (url != null) {
+            return url;
+        }
+
         String baseExternal = baseUrl.toExternalForm();
 
         if (baseExternal.startsWith("jar")) {
