Tag: Type

Make Tomcat 5 to handle wmv (Windows Media Video) files

1

May 14, 2009 at 4:42 pm Filed in:App servers

This week I have uploaded two videos to the website of the institute I work for.  There was a problem with Tomcat related to wmv files because it was not recognizing the mime type and users where experiencing problems when trying to download the videos.

I was surfing internet looking for the solution to that problem and I found it:

All what it has to be done is to add a new mime type to the web.xml file  (the one inside of  Tomcat’s conf directory):


<mime-mapping>
    <extension>wmv</extension>
    <mime-type>application/octet-stream</mime-type>
</mime-mapping>

It could sound strange but this mime is not correct but that makes it to work for both IE and other browsers.

So edit the file and restart Tomcat, that is all.

Taken from:  Visit site