Alisson Diel Alisson Diel - 17 days ago 5
Apache Configuration Question

Tomcat 8 problems on download files from browser

I have two servers, apache tomcat 7 and apache tomcat 8, on tomcat 7 it's all ok, but on tomcat 8 a problem happens, when I click on generate .xlsx file, of error page 404, but the file is generated, pressing f5 on the error page the file is downloaded.

Button to generate excel file

enter image description here

File generated but not downloaded

enter image description here

The Mime types are ok, i make a copy from tomcat7
Remembering that the same application on the tomcat 7 server works perfectly.

Answer

Tomcat 8 changed the way that file-caching works. I suspect you need to tweak some of your configuration to account for that. Have a look at the resources section of the Tomcat configuration guide for how to configure the caching.

Remember that Tomcat will cache a "not found" file-lookup just as well as a "found" file-lookup under normal circumstances.