protected boolean copyRequestedContentToResponse ( String requestedPath , HttpServletResponse response , String contentType ) throws IOException { boolean copyDone = false ; if ( isValidRequestedPath ( requestedPath ) ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Path '" + requestedPath + "' does not belong to a bundle. Forwarding request to the server. " ) ; } try ( InputStream is = servletContext . getResourceAsStream ( requestedPath ) ) { if ( is != null ) { response . setContentType ( contentType ) ; IOUtils . copy ( is , response . getOutputStream ( ) ) ; copyDone = true ; } } } return copyDone ; }
Copy the requested content to the response