I have a web application on Wildfly 10 and in the web application directory i have placed a zip file that I want to be downloaded when user clicks on the hyperlink. On the UI I have
Snippet
<div class="tyDiv" onclick="window.open('request.getContextPath() + "/downloads/Installer.exe")%>','_self')">
</div>
It creates 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 downloads the exe file but in Wildfly it display all the junk characters on the screen as its content type is text/html
I tried setting mime type in standalone-full.xml but did not work.
<mime-mappings>
<mime-mapping name="css" value="text/css"/>
<mime-mapping name="exe" value="application/octet-stream"/>
</mime-mappings>