Eclipse 3.3.1.1, JRE 1.6.0_03, Tomcat 6.0, webwork 2.2.4
I've created a test upload/view file page. I can successfully upload and return the file to view. However, the content type is always application/octet-stream except for txt.
String contentType = new MimetypesFileTypeMap().getContentType(filename);
System.out.println("contenttype for " + filename + ": "+contentType);
I created mime.types in my META-INF for tomcat and populated it, but it doesn't change anything. Uploading an mp3 should return the audio/mpeg3 I have in mime.types:
audio/mpeg3 mp3
I verified that it is in /wtpwebapps/MyApp/META-INF/
My web.xml even has it:
<mime-mapping>
<extension>mp3</extension>
<mime-type>audio/mpeg3</mime-type>
</mime-mapping>
Am I missing something?