 <p>Add a <code>flush</code> before <code>close</code> of the <code>OutputStream</code>. </p> <pre><code> response.getOutputStream().flush(); </code></pre> <p>Or If you are using Spring MVC 4.2 you can make use of <code>StreamingResponseBody</code></p> <pre><code>public StreamingResponseBody stream(HttpServletRequest req) throws FileNotFoundException { File file = new File(req.getRealPath("/")+"js/loginPage/usermanual.pdf"); InputStream is = new FileInputStream(file); return (os) -&gt; { IOUtils.copy(is, os); }; } </code></pre> <p>For more information see this <a href="http://shazsterblog.blogspot.com/2016/02/asynchronous-streaming-request.html" rel="nofollow">post</a></p>