This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

getting the JDK built-in web server to set the correct mime type


I'm using the JDK built-in web server to serve up .html and .css files.
When I view the files using IE9, the .css seems to be ignored, and I get
the following error in the IE web console:
  SEC7113: CSS was ignored due to mime type mismatch styling.css
So I'm assuming that the web server isn't setting the mime type correctly.

The Kawa docs say "If Kawa doesn't recognize the language of a script (and
it isn't named +default+) then it assumes the file is a data file. It asks
the servlet engine to figure out the content type (using the getMimeType
method of ServletContext), and just copies the file into the response."
However, in KawaAutoHandler.java, I see the following on line 158:
  //String contentType =3D context.getMimeType(path); FIXME
  //hctx.setContentType(contentType);
I'm guessing this is the source of the problem. Does anyone know why this
is commented out, and what I might need to do to fix it?

thanks,
Alex



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]