code: public static String rewriteGeneratedBinaryResourceDebugUrl(String requestPath, String content, String binaryServletMapping) {
  
  		// Write the content of the CSS in the Stringwriter
  		if (binaryServletMapping == null) {
  			binaryServletMapping = "";
  		}
  
  		// Define the replacement pattern for the generated binary resource
  		// (like jar:img/myImg.png)
  		String relativeRootUrlPath = PathNormalizer.getRootRelativePath(requestPath);
  		String replacementPattern = PathNormalizer
  				.normalizePath("$1" + relativeRootUrlPath + binaryServletMapping + "/$5_cbDebug/$7$8");
  
  		Matcher matcher = GENERATED_BINARY_RESOURCE_PATTERN.matcher(content);
  
  		// Rewrite the images define in the classpath, to point to the image
  		// servlet
  		StringBuffer result = new StringBuffer();
  		while (matcher.find()) {
  			matcher.appendReplacement(result, replacementPattern);
  		}
  		matcher.appendTail(result);
  
  		return result.toString();
  	}
docs: Rewrites the generated binary resource URL for debug mode
  
  @param requestPath
  the request path
  @param content
  the content to rewrite
  @param binaryServletMapping
  the binary servlet mapping
  @return the rewritten content