tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Rifel <pri...@mixpo.com>
Subject Setting Content-Type for a static resource
Date Thu, 07 May 2015 21:06:07 GMT
Hello, 

I'm using Tomcat 8.0.21 and have a static /crossdomain.xml file that I would like to serve
with a Content-Type of "text/x-cross-domain-policy".  I'm using the Tuckey url rewrite filter
to set the response's Content-Type but it appears to be getting overwritten back to application/xml.
 Stepping through the source code it looks like DefaultServlet.serveResource is grabbing the
mime-type from crossdomain.xml's webResource which I assume comes from the global web.xml's
mime-mappings.  Is there a way to override this, short of creating a new servlet that responds
with the file's contents?

Thanks in advance,

Peter Rifel
prifel@mixpo.com
Mime
View raw message