C
Christopher M. Balz
I set the MIME type of a css file that I serve out of the right Tomcat
3.3.1 webapp directory
(http://mydomain.com:8080/mywebapp/static/canvas.css), but Mozilla 1.4
reports that the MIME type is text/plain, not text/css, and so refuses
to load it.
Not surprisingly, Internet Explorer 5.5 has no problem loading the css
file and using it correctly, with or without my web.xml mime-type
mappings. How do I know that Tomcat is sending the css file out as
text/css or not? If it's not, why not? Below please find the web.xml
fragment containing my mime-mapping tags:
<servlet-mapping>
<servlet-name>
PhraseologicSimpleQuery
</servlet-name>
<url-pattern>
/simpleQ
</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>
css
</extension>
<mime-type>
text/css
</mime-type>
</mime-mapping>
<mime-mapping>
<extension>
html
</extension>
<mime-type>
text/html
</mime-type>
</mime-mapping>
<mime-mapping>
<extension>
js
</extension>
<mime-type>
text/javascript
</mime-type>
</mime-mapping>
</web-app>
3.3.1 webapp directory
(http://mydomain.com:8080/mywebapp/static/canvas.css), but Mozilla 1.4
reports that the MIME type is text/plain, not text/css, and so refuses
to load it.
Not surprisingly, Internet Explorer 5.5 has no problem loading the css
file and using it correctly, with or without my web.xml mime-type
mappings. How do I know that Tomcat is sending the css file out as
text/css or not? If it's not, why not? Below please find the web.xml
fragment containing my mime-mapping tags:
<servlet-mapping>
<servlet-name>
PhraseologicSimpleQuery
</servlet-name>
<url-pattern>
/simpleQ
</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>
css
</extension>
<mime-type>
text/css
</mime-type>
</mime-mapping>
<mime-mapping>
<extension>
html
</extension>
<mime-type>
text/html
</mime-type>
</mime-mapping>
<mime-mapping>
<extension>
js
</extension>
<mime-type>
text/javascript
</mime-type>
</mime-mapping>
</web-app>