I have a web application on Wildfly 10 and in the web application directory I put the zip file that I want to download when the user clicks on the hyperlink. In the user interface, I
Excerpt
<div class="tyDiv" onclick="window.open('request.getContextPath() + "/downloads/Installer.exe")%>','_self')"> </div>
It creates the correct url like
"http://192.168.2.123:8080/comp/downloads/Installer.exe" Content-Type:text/html;charset=UTF-8
This works in JBoss6, as expected. It loads the exe file, but in Wildfly it displays all the unnecessary characters on the screen, since its content type is text / html
I tried to set the mime type to standalone-full.xml but it did not work.
<mime-mappings> <mime-mapping name="css" value="text/css"/> <mime-mapping name="exe" value="application/octet-stream"/> </mime-mappings>
happy source share