This content has been marked as final. Show 1 reply
Your problem is due to using a JSP. Between the JSP "directives" you have CRLF that is send to the client, that is, between
<%@ page import="java.io.File, java.io.InputStream, java.io.FileInputStream, java.io.OutputStream"%>and
<%@ page session="false" %>you have a CRLF, as well as in other places... You could take them off, but you will get one CRLF (the last one)... So it's not a good practice to download files through JSP; better use a Servlet or you will get corrupted data most of the times.