I found an old thread describing the same problem I'm running into --
but it seems to end here. Has anyone else found a solution ?

I have xml files served up by a cocoon reader.
They sometimes generate annoying errors messages in the browser.
 Normally, these are styled into html in cocoon, but a raw
directory link is provided for download -- but all of the
users don't know they should right-click, and they get confused
by the error messages into thinking that it didn't completely
load. I would rather not go thru the xml pipeline, if only to
allow them to download broken XML files to edit and fix.

 But it doesn't look like you can set the content-disposition
header from an action or from flowscript when using a reader.

Any ideas ?

-- Steve Majewski / UVA Alderman Library



On Sep 29, 2006, at 11:24 AM, Geert Josten wrote:

PS:

I believe I also tried setting the header from FlowScript, but had the
impression it was either ignored or overruled by the reader..

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: Geert Josten [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 29 september 2006 17:04
Aan: users@cocoon.apache.org
Onderwerp: RE: RE: link to a file

Hi,

You found the thread on which I based my solution! :-)

However, for some reason it doesn't work on readers. I hadn't
noticed until after my first reply that I had commented it
out in my own sitemap and had replaced it with a
generate/serialize wrapped in the set-header action.

It looks apparently like the response object is not yet
created at the moment that the action is executed, which is
before the reader. Design flaw?

Kind regards,
Geert




Drs. G.P.H. Josten
Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is
afkomstig van Daidalos BV en is uitsluitend bestemd voor de
geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken wij u het te verwijderen. Aan dit bericht kunnen
geen rechten worden ontleend.


Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens
Bertrand Delacretaz
Verzonden: vrijdag 29 september 2006 16:49
Aan: users@cocoon.apache.org
Onderwerp: Re: RE: link to a file

On 9/29/06, Roel Croonenberghs <[EMAIL PROTECTED]> wrote:

...it opens .html, .txt, .jpg, .gif  files in the browser
instead of
downloading them...

You need to set the content-disposition HTTP header to trigger a
download, this thread shows how (I think, didn't check in detail):

http://marc2.theaimsgroup.com/?l=xml-cocoon-users&m=1108910965
22009&w=2

And this explains the principle:
http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html

-Bertrand


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



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



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



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

Reply via email to