Adding MIME types to JBOSS
by , 11-01-2011 at 05:51 PM (1542 Views)
Consider that you have an application deployed on JBOSS application server. You offer different files in your application that can be opened or downloaded. But someone complains that the web application shows code of the file imbedded in the web page instead of opening or downloading it. What problem can there be?
Actually you have to tell your JBOSS application server of the supported files. For this, you need to add an entry in web.xml. For instance:
<mime-mapping>
<extension>dtd</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>exe</extension>
<mime-type>application/exe </mime-type>
</mime-mapping>
Hope this helps.









Email Blog Entry
Size Reduced for Images in PDF &...
05-15-2013, 05:53 PM in Java Software