Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 74489 invoked from network); 6 Nov 2009 11:25:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Nov 2009 11:25:55 -0000 Received: (qmail 71078 invoked by uid 500); 6 Nov 2009 11:25:54 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 71016 invoked by uid 500); 6 Nov 2009 11:25:54 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 71008 invoked by uid 99); 6 Nov 2009 11:25:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 11:25:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jtviegas@gmail.com designates 209.85.218.225 as permitted sender) Received: from [209.85.218.225] (HELO mail-bw0-f225.google.com) (209.85.218.225) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 11:25:43 +0000 Received: by bwz25 with SMTP id 25so1150188bwz.18 for ; Fri, 06 Nov 2009 03:25:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=GvCwPFCaYxBxVgVaPaVcEgSsNEcH3dZOca1ByLtEkCw=; b=f+6AlrhRsJ1ATp3ks/RW07rkHj4W8JC1DtxsE31ETBtmm3omb7tuLIB3DgWrOFnxhI OSnjak78yfG4pGx/u0DQulX5D5LrEJuYm2lMgeIgDzcRizFiot6UKW31VZRL4vtOfvk2 I8hZ/d1Vnume27tiJJQ7CDl4J4YiVZQNmxB8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=hwc9y+Be0CqduSBCtJnAuRxAhtcayop+sJYTBMioJXs47NzUeqGT2qPt6xml+tMJRt rqZuviyIgGWdSLCyKGyce9SS6BlSBTDBDyzipEEC2bHhNAwx54KmVLZzRc1Sb6wmYi0n feHXZD3Ua+6AOww4eXaDNNULlM6LeQSJvBQCk= MIME-Version: 1.0 Received: by 10.239.168.220 with SMTP id l28mr418309hbe.117.1257506723208; Fri, 06 Nov 2009 03:25:23 -0800 (PST) In-Reply-To: <5f15e0020911060321w5303bb9fyce535b25142c08c2@mail.gmail.com> References: <5f15e0020910170134if1da5f8tcb5040408a0bc0b7@mail.gmail.com> <3AC1E317-A758-4E4E-956A-ACC5E3C20631@gmx.at> <5f15e0020910190858q1c6329adjc2cc26c7bad962c3@mail.gmail.com> <18cbef3f0910192327g32e9b3d8jadcd5899f055e432@mail.gmail.com> <5f15e0020910200329x25cf6916k812084532aa2ae5@mail.gmail.com> <18cbef3f0910200403x282f1877y9a0d1103e9949d6d@mail.gmail.com> <5f15e0020911060321w5303bb9fyce535b25142c08c2@mail.gmail.com> From: "joao tiago a. m. viegas" Date: Fri, 6 Nov 2009 11:25:03 +0000 Message-ID: <5f15e0020911060325x1e8e7347p8e811563b2c30bbe@mail.gmail.com> Subject: Re: problem showing pdf as text/plain with resourcereader To: users@cocoon.apache.org Content-Type: multipart/alternative; boundary=001636499f7f8a206e0477b219b7 X-Virus-Checked: Checked by ClamAV on apache.org --001636499f7f8a206e0477b219b7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry, i've sent erroneously the previous message, i'll finish it now; so... i've read the example at the documentation about flow and coded a javascript function in order to process a document and after it reading it, function invoicecontroller() { processPipelineTo(" > > invoicecreator", null); > sendPage("filereader"); > } > > ...the problem is that the page answer is "processPipelineTo" is not defined ...and even the "sendPage" call, i must do it without referencing it throug= h the cocoon (cocoon.sendPage())object otherwise i won't get it to work. I must be lacking something here, do you have an idea? Best Regards jo=C3=A3o tiago viegas 2009/11/6 joao tiago a. m. viegas > Hello again, > > i've read the example at the documentation about flow > and coded a javascript function in order to process a dicument and after = it > reading it, > > function invoicecontroller() > { > processPipelineTo("invoicecreator", null); > sendPage("filereader"); > } > > ...the problem is that the page answer is > > > com os melhores cumprimentos > jo=C3=A3o tiago viegas > > > 2009/10/20 Jasha Joachimsthal > >> You could solve it with flowscript. >> >> function writeandread() { >> cocoon.processPipelineTo("pipelineThatWritesTheFile", NullOutputStream); >> // executes the pipeline that does the writing, but does not return a >> response >> cocoon.sendPage("pipelineThatReadsTheFile"); // executes the pipeline wi= th >> the map:read for the newly created file and sends the response to the >> browser >> } >> >> >> 2009/10/20 joao tiago a. m. viegas >> >> Thank you very much Jasha, >>> >>> that explains some questions i've had. >>> >>> But can't i do a redirection within my serializer implementer code, or = it >>> just ends in there and no more processing is done in the pipeline? >>> >>> >>> com os melhores cumprimentos >>> jo=C3=A3o tiago viegas >>> >>> >>> 2009/10/20 Jasha Joachimsthal >>> >>> After >>>> >>>> >>> value=3D"{path}"/> >>>> >>> value=3D"{file}"/> >>>> >>>> >>>> Your pipeline is done so it will not reach >>>> >>>> >>> src=3D"{path}/{file}" mime-type=3D"application/pdf" /> >>>> >>>> But you could change it into some flowscript function call that handle= s >>>> the saving and then responds with the PDF. >>>> >>>> Jasha Joachimsthal >>>> >>>> j.joachimsthal@onehippo.com - jasha@apache.org >>>> >>>> www.onehippo.com >>>> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 >>>> San Francisco - Hippo USA Inc. 185 H Street, suite B, Petaluma CA 9495= 2 >>>> +1 (707) 7734646 >>>> >>>> >>>> 2009/10/19 joao tiago a. m. viegas >>>> >>>> Thank you very much Alexander, >>>>> >>>>> i've discovered with LiveHTTPHeaders addon that the content-length is= =3D >>>>> 0 !!! >>>>> >>>>> the pipeline section is this: >>>>> >>>>> >>>>> >>>>> >>>> value=3D"{savepdf}"/> >>>>> >>>>> >>>>> >>>> value=3D"{path}"/> >>>>> >>>> value=3D"{file}"/> >>>>> >>>>> >>>> src=3D"{path}/{file}" mime-type=3D"application/pdf" /> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> it tests if it's desired to save the file in the filesystem, and if s= o, >>>>> saves it (it does gets saved allright though), but the reader simply = does >>>>> not work! >>>>> >>>>> i'm I overlooking something here? >>>>> >>>>> com os melhores cumprimentos >>>>> jo=C3=A3o tiago viegas >>>>> >>>>> >>>>> 2009/10/18 Alexander Daniel >>>>> >>>>> On 17.10.2009, at 10:34, joao tiago a. m. viegas wrote: >>>>>> >>>>>> Hello everyone, >>>>>>> >>>>>>> i'm having this problem where i want to read static pdf files in th= e >>>>>>> server and "supply" them to the browser for being read by the acrob= at pdf >>>>>>> plugin. The plugin always complains about it being a text/plain fil= e. >>>>>>> I'm using the default resource reader and specifying the mime-type, >>>>>>> just like in the user documentation, strictly by the book. >>>>>>> >>>>>> >>>>>> For analysis you could check with Firefox Add-on Live HTTP Headers [= 1] >>>>>> whether the HTTP response headers are sent correctly to the browser. >>>>>> >>>>>> Alex >>>>>> >>>>>> [1] https://addons.mozilla.org/en-US/firefox/addon/3829 >>>>>> >>>>>> --------------------------------------------------------------------= - >>>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>>>> >>>>>> >>>>> >>>> >>> >> > --001636499f7f8a206e0477b219b7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry,
i've sent erroneously the previous message, i'll finish i= t now;

so...

i've read the example at the documentation a= bout flow
and coded a javascript function in order to process a document= and after it reading it,

function invoicecontroller()
{
=C2=A0=C2=A0 processPipelineTo(&qu= ot;
invoicecreator= ", null);
=C2=A0=C2=A0 sendPage("filereader");
}

...the problem i= s that the page answer is
"processPipelineTo" is not= defined

...and even the "sendPage" call, i must do it wit= hout referencing it through the cocoon (cocoon.sendPage())object otherwise = i won't get it to work.

I must be lacking something here, do you have an idea?


Best Regards
jo=C3=A3o tiago viegas


2009/11/6 joao tiago a. m. viegas <jtviegas@gmail.com>
Hello again,

i've read the example at the documentation about fl= ow
and coded a javascript function in order to process a dicument and af= ter it reading it,

function invoicecontroller()
{
=C2=A0=C2= =A0 processPipelineTo("invoicecreator", null);
=C2=A0=C2=A0 sendPage("filereader");
}

...the problem i= s that the page answer is


com os melhores cumprimentos
jo=C3=A3o tiago viegas


2009/10/20 Jasha Joachimsthal <j.joachimsthal@onehippo.com>
You could solve it with flowscript.

function writeandrea= d() {
cocoon.processPipelineTo("pipelineThatWritesTheFile&qu= ot;, NullOutputStream); // executes the pipeline that does the writing, but= does not return a response
cocoon.sendPage("pipelineThatReadsTheFile"); // executes the= pipeline with the map:read for the newly created file and sends the respon= se to the browser
}


2009/10/20 joao tiago a. m. viegas <jt= viegas@gmail.com>

Thank you very much Jasha,

that explains some questions i've had= .

But can't i do a redirection within my serializer implementer = code, or it just ends in there and no more processing is done in the pipeli= ne?


com os melhores cumprimentos
jo=C3=A3o tiago viegas

2009/10/20 Jasha Joachimsthal <j.joachimsthal@onehippo.com>

After
<map:serialize ty= pe=3D"invoice2filesys">
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:parameter name= =3D"path" value=3D"{path}"/>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 <map:parameter name=3D"file" value=3D"{file}&qu= ot;/>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </map:serialize>

Your= pipeline is done so it will not reach

=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 <map:read type=3D"resource" src=3D"{path}= /{file}" mime-type=3D"application/pdf" />

But= you could change it into some flowscript function call that handles the sa= ving and then responds with the PDF.=C2=A0

Jasha Joachimsthal

j.joachimsthal@onehippo.com - jasha@apache.org

www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
S= an Francisco - Hippo USA Inc. 185 H Street, suite B, Petaluma CA 94952 +1 (= 707) 7734646


2009/10/19 joao ti= ago a. m. viegas <jtviegas@gmail.com>

Thank you very mu= ch Alexander,

i've discovered with LiveHTTPHeaders addon that th= e content-length is =3D 0 !!!

the pipeline section is this:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:act type= =3D"invoice-save-action">
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:sel= ect type=3D"parameter">
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:parameter name=3D"parameter-sel= ector-test" value=3D"{savepdf}"/>
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:when test=3D"1&q= uot;>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:serialize type=3D"invoice= 2filesys">
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:parameter name=3D"path"= value=3D"{path}"/>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:parameter name=3D&quo= t;file" value=3D"{file}"/>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </map:serialize>
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:read type=3D"resource" src= =3D"{path}/{file}" mime-type=3D"application/pdf" /><= br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </map= :when>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:oth= erwise>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <map:serialize type= =3D"fo2pdf"/>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 </map:otherwise>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </map:select>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </map:act>


it t= ests if it's desired to save the file in the filesystem, and if so, sav= es it (it does gets saved allright though), but the reader simply does not = work!

i'm I overlooking something here?

com os melhores cumprimentos
jo=C3=A3o tiago viegas

2009/10/18 Alexander Daniel <alex= ander.daniel@gmx.at>

On 17.10.2009, at 10:34, joao tiago a. m. viegas wrote:

Hello everyone,

i'm having this problem where i want to read static pdf files in the se= rver and "supply" them to the browser for being read by the acrob= at pdf plugin. The plugin always complains about it being a text/plain file= .
I'm using the default resource reader and specifying the mime-type, jus= t like in the user documentation, strictly by the book.

For analysis you could check with Firefox Add-on Live HTTP Headers [1] whet= her the HTTP response headers are sent correctly to the browser.

Alex

[1] https://addons.mozilla.org/en-US/firefox/addon/3829

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







--001636499f7f8a206e0477b219b7--