You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2004/10/20 16:12:03 UTC

pdf output in IE

When using a plain servlet or jsp and outputting PDF (and setting the 
response content type to pdf) and reading that in IE (not Mozilla, NS, ... 
) a lot of problems can occur; this is becourse IE looks for the file 
extension to see which content type he should use (and not the http 
headers).
I was just wondering how this is done with Cocoon if your URL is for 
example "report" (so definitely without an extension) and in the sitemap 
you are using a reader to get the pdf from the filesystem and setting the 
content type to pdf.
has Cocoon some workaround for this or does it have the same problem?
Regards,
Gunter

Re: pdf output in IE

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Gunter D'Hondt wrote:
> When using a plain servlet or jsp and outputting PDF (and setting the 
> response content type to pdf) and reading that in IE (not Mozilla, NS, 
> ... ) a lot of problems can occur; this is becourse IE looks for the 
> file extension to see which content type he should use (and not the http 
> headers).
> 
> I was just wondering how this is done with Cocoon if your URL is for 
> example "report" (so definitely without an extension) and in the sitemap 
> you are using a reader to get the pdf from the filesystem and setting 
> the content type to pdf.

If you don't use anything which can be mistaken as an extension, IEx
uses the content-type to decide what to do with the content. If you've
got a dot in the last component of the URL, it depends whether the
string after the last dot is a a registered file extension in the
Windows registry.
There's still the problem that the content may be retrieved twice
or even three times.

> has Cocoon some workaround for this or does it have the same problem?

Cocoon's mapping mechanism makes it is easy to use URLs ending
in .pdf for PDF content.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org