tomcat css mime-type

J

jt

Hello,

I'm using Tomcat 3.3.2 with Apache 1.3.26 .
I can't set proper mime-type for my "css" files, though I have this section in
my /WEB-INF/web.xml:

<mime-mapping>
<extension>css</extension>
<mime-type>text/css</mime-type>
</mime-mapping>

I include the "css" with a "link" tag in "jsp" files:

<link type="text/css" rel="stylesheet" ref="./style/style.css" />

The "css" file is sent as "text/plain" and Firefox won't interpret it (now
that's the problem).

Could someone tell me what I missed?
 
K

kaeli

Hello,

I'm using Tomcat 3.3.2 with Apache 1.3.26 .
I can't set proper mime-type for my "css" files, though I have this section in
my /WEB-INF/web.xml:

I know Tomcat looks at that. I don't know if Apache does.
My guess - Apache isn't, yet is the one serving the doc.

Did you set the mime type in Apache?

--
 
J

jt

Did you set the mime type in Apache?

Yes, when requesting a "css" file through Apache port, the mime type
is OK.

It appears that putting the directives in a global web.xml file in
$TOMCAT_HOME/conf/ solves the problem. It sounds obvious to me to have
a global config but no global web.xml (even empty) came with the
distribution (, and overloading the global one with a
"WEB-INF/web.xml" doesn't work).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top