I have to serve large pdfs ( 50 mb+ ) with jboss because of a security requirement. Its working fine for 17mb files but larger files are giving the error. "This file is damaged and cannot be repaired."
Is there a tomcat setting that can fix this?
Found the solution.
if (requestUri != null && requestUri.endsWith("pdf")) { response.setHeader("Accept-Ranges", "bytes"); }