basic question:
is there way set mime-type (content-type) of elements inside jar pulled zk theme?
extended background (already posted zk forums no response)
we building theme .jar our application, , have gotten work pretty using zktheme.bat. problem i'm having, however, using pie.htc (http://www.css3pie.com) in order provide css3 capabilities ie 7 , ie 8 (specifically rounded corners, gradients, , box-shadow). way link inside theme point relative resource inside jar so:
behavior:url(${c:encodeurl(c:cat3('~./',project,'/pie.htc'))});
where c: namespace core, , project root directory of project. points correct file resource, header not being set correctly. doing wget on file, following:
http request sent, awaiting response... http/1.1 200 ok server: apache-coyote/1.1 last-modified: thu, 28 apr 2011 12:36:54 gmt cache-control: public, max-age=31536000 expires: fri, 27 apr 2012 12:36:07 gmt content-type: ;charset=utf-8 content-language: en-us content-length: 28284 date: thu, 28 apr 2011 14:08:23 gmt connection: keep-alive length: 28284 (28k) []
as can see, content-type blank. because of files inside .jar being served image resources, not behavior files. here if wget file itself.
http request sent, awaiting response... http/1.1 200 ok server: apache-coyote/1.1 accept-ranges: bytes etag: w/"28280-1299679133268" last-modified: wed, 09 mar 2011 13:58:53 gmt content-type: text/x-component content-length: 28280 date: thu, 28 apr 2011 14:10:34 gmt connection: keep-alive length: 28280 (28k) [text/x-component]
so underlying issue internet explorer doesn't see content-type header of "text/x-component" , therefore doesn't utilize code inside .htc parse css correctly. question therefore: there way make zk serve file .jar proper content-type? looking around @ configurations don't see way it. also, can't find underlying code powers extraction theme.jar in order alter code figure out content-type. realize can drop pie.htc somewhere on webserver , point outside of theme jar, makes code less portable , therefore eliminates pretty portion of our logic use theme jar @ all.
please note: we're serving on tomcat, , i've checked web.xml make sure text/x-component bound, (which case or else second wget wouldn't have turned out did).
so discovered workaround fit needs , possible. basically, replaced behavior.htc file behavior.htc.dsp file, , added following line top:
<%@ page contenttype="text/x-component;charset=utf-8" %>
my initial fear ie not parse proper filetype because of extension, apparently cares content-type in header, worked.
Comments
Post a Comment