code: public static List<String> findResourcesToMerge(String contextPath, String requestURI) {
  
          String extension = Utils.detectExtension(requestURI);
  
          requestURI = requestURI.replaceFirst(contextPath, "");//.replace(extension, "");//remove the context path & ext. will become /path/subpath/a,b,/anotherpath/c
          requestURI = requestURI.substring(0, requestURI.lastIndexOf(extension));
  
          String[] resourcesPath = requestURI.split(",");
  
          List<String> resources = new ArrayList<>();
  
          String currentPath = PATH_ROOT; //default
  
          for (String filePath : resourcesPath) {
  
              String path = Utils.buildProperPath(currentPath, filePath) + extension;
              if (filePath == null) continue;
  
              currentPath = getParentPath(path);
              if (!resources.contains(path)) {
                  resources.add(path);
              }
          }
          return resources;
      }
docs: Split multiple resources with comma eg. if URL is http://server/context/js/a,b,c.js
  then a.js, b.js and c.js have to be processed and merged together.
  <p>
  b and c can be absolute paths or relative (relative to previous resource) too.
  <p>
  eg.
  <p>
  http://server/context/js/a,/js/libs/b,/js/yui/c.js - absolutes paths for all OR
  http://server/context/js/a,/js/libs/b,../yui/c.js - relative path used for c.js (relative to b) OR
  http://server/context/js/a,/js/libs/b,./c.js OR - b &amp; c are in same directory /js/libs
  
  @param contextPath request Context Path
  @param requestURI  requestURI
  @return Set of resources to be processed