You can write a Response Filter which sets the Content type of your
The filter could be added as the last filter in the chain to make sure
that no other
filter is changing it's content type.
John Steel wrote:
>test.jsp here http://www.caucho.com/resin-3.1/doc/xslt-filter.xtp shows
>you need to add this and the filter to the web-app in order for it to
>trigger resin to performing the transformation. I'm having an issue
>based on that example where basically I need to also control the
>contentType for real, i.e. "text/html", "text/xml" etc.
>How can I do this whilst still using the xsl filter please?
>The problem is in the stylesheet, if I change method="xml" to
>method="html" below the contentType in the HTTP response toggles between
>"Content-Type: text/xml; charset=UTF-8" and "Content-Type: text/html;
> doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
>I want to retain the method="xml" line but have it served as html so the
>browser doesn't complain about missing stylesheets. But of course, as
>soon as I try to set the contentType in the JSP I find I must leave it
>at 'x-application/xslt' or the filter won't be applied.
resin-interest mailing list