Hi,

I encounter exactly the same problem,

I try to create my own reader but it fails .

what I done is that I create a separate servlet  that specially read files  from the file system and stream them to the HttpResponse .

It seems that the reader does not really us the real Http Response ?  (Is there someone who can confirm it  ?)

It work fine !

Pay attention !! For ie , the called url must end with the file extension   e.g  if you want to return a text ==> url = "">

in your web.xml  , map all the /servletfilereader/* to your servlet and use blabla.txt as parameter

Hope it could help

Laurent


Joel Reungoat <[EMAIL PROTECTED]>

20/04/2004 13:04
Please respond to users

       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        ressource reader bug with IE (linked to caching)



Hello users,

I'm trying to access DOC or PDF files using the ressource reader component as described in the sitemap below and get the following error only under Microsoft IE :

>>>>>>>>>>
Internet Explorer cannot download test.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.
>>>>>>>>>>


This message also only appears at the first attempt. It seems that at first attempt, the file has been prepared in the cache. So, if  I refresh the page a second time from IE, I get and open correctly my document under Word (or Acrobat if pdf).

When using Mozilla navigator, there is no problem at first attempt.
Also, if a first attempt is made from Mozilla, then the first attempt from IE is working.
So it seems that Cocoon caching is implicated.
I made a test in the sitemap by forcing "noncaching" for the pipeline. And then, I can not access at all to my document.

Does anybody have a solution for this problem ?

My cocoon version : 2.1.4
My IE version : 5.5 (probably problems also with 6.0)
IE configaration for caching page : "automatic" (other choice produces same problem)
Other links I found without answers :
http://www.mail-archive.com/[EMAIL PROTECTED]/msg07949.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg04959.html

Here is my sitemap :
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
 <map:pipeline type="caching">         <!--   With caching, the problem occurs only at the first read -->
<!-- <map:pipeline type="noncaching">   Without caching, the problem occurs at each attempt -->
       <map:match pattern="**.doc">
       <map:read src="" mime-type="application/msword"/>
     </map:match>
     <map:match pattern="**.pdf">
       <map:read src="" mime-type="application/pdf"/>
     </map:match>
 </map:pipeline>
</map:pipelines>
</map:sitemap>

Reply via email to