code: public static String appendHashSuffix(String url, String hash) {
          if (null == hash) return url;
          Matcher matcher = FILENAME_PATTERN.matcher(url);
          String fname = "";
          if (matcher.find()) fname = matcher.group(0);
          return url + "/" + hash + "/" + fname;
      }
docs: Appends a suffix containing the hash code, if given. The file name is repeated to satisfy browsers
  with the correct type and file name, though it is not used by the servlet.
  
  @param url  an url to which we append the suffix
  @param hash optional, the hash code
  @return the url with suffix /{hash}/{filename} appended, where {filename} is the last part of a / separated url.