tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alireza Fattahi <>
Subject JSP in Static Resources
Date Sat, 13 Jul 2013 07:20:31 GMT

I want to add some jsp code in to my site.css.

So, as this is a static resource I add below to my web.xml and ask tomcat to compile it as
a jsp.

When I view the site in firefox it shows an error which says:
[11:46:41.547] The stylesheet site.css was not loaded because its MIME type, "text/html",
is not "text/css". @ chrome://fdm_ffext/content/fdm_brcache.js:86

I have added below to web.xml

It did not helped. The site pages link to css as below:
<link href="/styles/site.css"   rel="stylesheet" type="text/css" />

When I remove the servlet mapping and mime-mapping everything works fine. So I believe the
mime type is not set correctly for css files.
Any comments ?!

~~Alireza Fattahi
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message