Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 33357 invoked from network); 3 Aug 2004 18:42:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Aug 2004 18:42:21 -0000 Received: (qmail 98616 invoked by uid 500); 3 Aug 2004 18:42:09 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 98522 invoked by uid 500); 3 Aug 2004 18:42:09 -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 Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 98507 invoked by uid 99); 3 Aug 2004 18:42:09 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [212.8.217.2] (HELO mail.s-und-n.de) (212.8.217.2) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 03 Aug 2004 11:42:05 -0700 Received: from notes.sundn.de (ntsrv5.sundn.de [10.10.2.10]) by mail.s-und-n.de (postfix) with ESMTP id 30FD119F5E2 for ; Tue, 3 Aug 2004 20:42:03 +0200 (CEST) Received: from hw0386 ([192.168.2.31]) by notes.sundn.de (Lotus Domino Release 6.5) with ESMTP id 2004080320342507-14178 ; Tue, 3 Aug 2004 20:34:25 +0200 From: "Carsten Ziegeler" To: Subject: RE: SendMailTransformer session issue Date: Tue, 3 Aug 2004 20:42:24 +0200 Organization: S&N AG MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: <1091557761.2557.21.camel@localhost.localdomain> Thread-Index: AcR5hrc8rifMz+//SyOh12DZ80rRiwAAekIw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-MIMETrack: Itemize by SMTP Server on PBSN1/Systeme und Netzwerke(Release 6.5|September 26, 2003) at 03.08.2004 20:34:25, Serialize by Router on PBSN1/Systeme und Netzwerke(Release 6.5|September 26, 2003) at 03.08.2004 20:34:26, Serialize complete at 03.08.2004 20:34:26 Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N =20 Rui Alberto L. Gon=E7alves wrote: >=20 > I all, >=20 > I need to use SendMailTransformer to send the user the=20 > current page that he/she is viewing. > To do this, I'm doing: >=20 > > ... > mime-type=3D"text/html" > src=3D"cocoon:/display_user_page"/> ... > >=20 > I'm using cookies to identify the user session, and the=20 > target cocoon:/display_user_page uses user session values. >=20 > It looks like SendMailTransformer ignores this and just=20 > performs an http request as another new different client!=20 > (JSESSION id cookie is not sent) >=20 > Does anyone would like to suggest an approach to this problem? > Thanks for any help. > Rui >=20 I have currently no solution for this, but I can try to=20 explain what is happening: Usually, the cocoon protocol is resolved internally which means if you use it, the request is handled internally and no new http request is send. Of course, an internal request runs in the same session as the original one. Unfortunately, the cocoon protocol delivers by design XML, to be more precise the XML send by the last transformer before it is feed into the serializer. Therefore if you want to create a PDF attachment, using the cocoon protocol would simply fail. You wouldn't get PDF but XSL:FO which is not what you want :( Therefore the sendmail transformer "rewrites" the internal cocoon protocol to an external one in order to run the correct serializer at the end. I think it is possible to append the session id or to add=20 a cookie to the request, but it is not the same client! It is the server that acts now as the client. If your servlet engine verifies this, it won't work even if you would append=20 the information. Now, a possible solution would be to either extend or create a new protocol that works the same way as the cocoon protocol but doesn't always deliver XML. It would use the correct serializer at the end and offer a byte stream instead of sax events. Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org