Adding MIME types to JBOSS
18 July 2008Consider 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.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Adding MIME types to JBOSS