Hello,

Using Cocoon 2.1.5 I'm attempting to generate a PDF from a JSP generator. I'm using the Cocoon samples area to aid in this process by basing my sitemap off the FOP sitemap and adding a JSP generator in place of the XML generator sample. My XSL is the hello-world example as the generated XML is compatible at the moment.

<map:match pattern="*.pdf">
<map:generate type="jsp" src="{1}.jsp" />
<map:transform src="context://samples/hello-world/style/xsl/page2fo.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>


The problem is that the mime-type when starting with the JSP generator is always text/html. The PDF is generated correctly however any web browser upon seeing the mime-type text/html simply renders the PDF contents to the screen. This occurs even in the JSP examples that come with Cocoon. The hello.xml JSP example serializes the JSP page to XML but the mime-type is still text/html. Attempting to force override this mime-type with application/pdf does nothing. As a sanity test, replacing the JSP generation with a static XML file generator works.

Is this a known issue and is there a workaround?

I'm working with JDK1.4 on OS-X 10.3.3 with Tomcat 5.0. I have not yet tested this behaviour on other platforms.

Thanks to anyone for suggestions.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to