--- org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java	2021-01-01 00:00:00.000000000 +0000
+++ org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java.new	2021-01-01 00:00:00.000000000 +0000
@@ -26,6 +26,7 @@
 
 import org.apache.tomcat.Jar;
 import org.apache.tomcat.JarScannerCallback;
+import org.apache.tomcat.util.scan.TomcatUtilScanControllerHandler;
 import org.xml.sax.InputSource;
 
 /**
@@ -85,6 +86,10 @@
 
 
     private String extractJarFileName(URL input) {
+        String jarName = TomcatUtilScanControllerHandler.getTomcatController().getJarName(input);
+        if (jarName != null) {
+            return jarName;
+        }
         String url = input.toString();
         if (url.endsWith("!/")) {
             // Remove it
