protected String getRewrittenImagePath ( String originalCssPath , String newCssPath , String url ) throws IOException { String imgUrl = null ; // Retrieve the current CSS file from which the CSS image is referenced boolean generatedImg = false ; if ( binaryRsHandler != null ) { GeneratorRegistry imgRsGeneratorRegistry = binaryRsHandler . getConfig ( ) . getGeneratorRegistry ( ) ; generatedImg = imgRsGeneratorRegistry . isGeneratedBinaryResource ( url ) ; } String fullImgPath = PathNormalizer . concatWebPath ( originalCssPath , url ) ; if ( ! generatedImg ) { // Add image servlet path in the URL, if it's defined if ( StringUtils . isNotEmpty ( binaryServletPath ) ) { fullImgPath = binaryServletPath + JawrConstant . URL_SEPARATOR + fullImgPath ; } imgUrl = PathNormalizer . getRelativeWebPath ( PathNormalizer . getParentPath ( newCssPath ) , fullImgPath ) ; } else { imgUrl = url ; } return imgUrl ; }
Returns the rewritten image path