--- org/apache/catalina/webresources/CachedResource.java	2021-01-01 00:00:00.000000000 +0000
+++ org/apache/catalina/webresources/CachedResource.java.new	2021-01-01 00:00:00.000000000 +0000
@@ -34,6 +34,7 @@
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
+import org.apache.catalina.TomcatControllerHandler;
 import org.apache.catalina.WebResource;
 import org.apache.catalina.WebResourceRoot;
 import org.apache.juli.logging.Log;
@@ -586,6 +587,10 @@
 
         @Override
         public JarFile getJarFile() throws IOException {
+            JarFile jarFile = TomcatControllerHandler.getTomcatController().getJarFile(resourceURL);
+            if (jarFile != null) {
+                return jarFile;
+            }
             return ((JarURLConnection) resourceURL.openConnection()).getJarFile();
         }
 
