You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Carmona Perez, David" <DP...@fcc.es> on 2004/02/13 11:06:52 UTC

RE: File downloading problem

A solution that works for me is to use this reader (attached with this message) adapted from Cocoon 2.0.4, that should replace the buggy one that comes with Cocoon 2.1.2.
 
--------
David
 
-----Mensaje original-----
De: tonyo [mailto:tonyo@no-log.org]
Enviado el: miƩrcoles, 21 de enero de 2004 11:19
Para: users@cocoon.apache.org
Asunto: File downloading problem
 
Hi,
 
I'd like to make some Word and PDF files downloadable from my application, based on Cocoon 2.1.2 / Tomcat 4.1.18.
Here is the problem I meet:
- The first click on the link gives the following message :
Internet Explorer cannot download toto.doc from localhost
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
- If I click 'OK' and try again, then the downloading comes successful.
 
I know that this question has already been raised before, but the proposed solutions (consisting in adding a set-header action before the reader in the map:match) didn't solve my problem.
 
Here is an extract of my sitemap:
<!-- Word files -->
<map:match pattern="resources/**.doc">
    <map:read mime-type="application/msword" src="resources/{1}.doc"/>
</map:match>
<!-- PDF files -->
<map:match pattern="resources/**.pdf">
    <map:read mime-type="application/pdf" src="resources/{1}.pdf"/>
</map:match>
 
Many thanks in advance for your help
 
Antoine