code: private static JarFile _getAlternativeJarFile(URL url) throws IOException
      {
          String urlFile = url.getFile();
  
          // Find suffix prefixed by "!/" on Weblogic
          int wlIndex = urlFile.indexOf("!/");
          // Find suffix prefixed by '!' on OC4J
          int oc4jIndex = urlFile.indexOf('!');
          // Take the first found suffix
          int separatorIndex = wlIndex == -1 && oc4jIndex == -1 ? -1 : wlIndex < oc4jIndex ? wlIndex : oc4jIndex;
  
          if (separatorIndex != -1)
          {
              String jarFileUrl = urlFile.substring(0, separatorIndex);
              // And trim off any "file:" prefix.
              if (jarFileUrl.startsWith("file:"))
              {
                  jarFileUrl = jarFileUrl.substring("file:".length());
              }
              // make sure this is a valid file system path by removing escaping of white-space characters, etc. 
              jarFileUrl = decodeFilesystemUrl(jarFileUrl);
              if (isExcludedPrefix(jarFileUrl) || isExcludedSuffix(jarFileUrl))
              {
                  // excluded URL found, ignore it
                  return null;
              }
              return new JarFile(jarFileUrl);
          }
  
          return null;
      }
docs: For URLs to JARs that do not use JarURLConnection - allowed by the servlet spec - attempt to produce a JarFile
  object all the same. Known servlet engines that function like this include Weblogic and OC4J. This is not a full
  solution, since an unpacked WAR or EAR will not have JAR "files" as such.