cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gritsenko" <vgritse...@acm.org>
Subject Re: Cocoon 1.8.2 with Netscape 6 (and 4.7) problem
Date Tue, 20 Mar 2001 14:08:24 GMT
Sebastien,

Thank you for answering.

When I tried to type in http://........../something.xml , Netscape 6 had
same response.

Yes, I used xsl:fo.

Yes, I do have something like formatter.text/xslfo.MIME-type =
 application/pdf in cocoon.properties
Here it is:
# PDF
formatter.text/xslfo.MIME-type = application/pdf


My formatter.default = text/html

====
Now, I have resolved this problem by:

Writing new Producer - ProducerFromRequest. It's getStream method returns
StringBuffer made from String, which represents my XML document.

In my servlet I:

1. Dinamically generate XML doc using JDOMbeta6.
2. Use jdom xml outputter.outputString(doc).
3. Place this string into CocoonServletRequest - see source code.
4. Instantiate Cocoon engine.
5. call engine.handle(mycocoonrequest, myresponse)


The effect is that my servlet responds with application/pdf, without
resorting to redirection to text/xml file.

See source code attached.


Viktor






----- Original Message -----
From: Sebastien Koechlin <skoechlin@ivision.fr>
To: <cocoon-users@xml.apache.org>
Sent: Tuesday, March 20, 2001 8:55 AM
Subject: Re: Cocoon 1.8.2 with Netscape 6 (and 4.7) problem


> Gritsenko wrote:
> >
> > I have Cocoon 1.8.2. under Tomcat 3.2.
> >
> > IExplorer handles this redirect well - invokes Adobe Acrobat to show PDF
> > resulted.
> >
> > Netscape 6 (and 4.7)  instead say:
> >
> > 'This file has mime type text/xml and cannot be viewed using netscape 6.
> > you can open it with another application or save to disk'
>
> I don't know why you think this have something to do with redirection.
>
> IE is bad and does not read the content-type header. Netscape
> does, and it says that it's text/xml and not application/pdf.
>
> Did you try to ask for the file 'by-hand', typing the URL of the
> written file ? What is the answer ?
> Do you have a cocoon-format, using text/xslfo ? Does it
> match something in cocoon.properties ?
> Do you have something like formatter.text/xslfo.MIME-type =
> application/pdf
> in cocoon.properties ?
> What is your default formatter ?
>
> --
> S├ębastien Koechlin - IVision - skoechlin@ivision.fr
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>

Mime
View raw message