Adding MIME types to JBOSS

18 July 2008

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.

del.icio.us:Adding MIME types to JBOSS  digg:Adding MIME types to JBOSS  spurl:Adding MIME types to JBOSS  wists:Adding MIME types to JBOSS  simpy:Adding MIME types to JBOSS  newsvine:Adding MIME types to JBOSS  blinklist:Adding MIME types to JBOSS  furl:Adding MIME types to JBOSS  reddit:Adding MIME types to JBOSS  fark:Adding MIME types to JBOSS  blogmarks:Adding MIME types to JBOSS  Y!:Adding MIME types to JBOSS  smarking:Adding MIME types to JBOSS  magnolia:Adding MIME types to JBOSS  segnalo:Adding MIME types to JBOSS  gifttagging:Adding MIME types to JBOSS

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

Leave a Reply