Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 49551 invoked from network); 14 Dec 2006 04:13:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Dec 2006 04:13:38 -0000 Received: (qmail 28535 invoked by uid 500); 14 Dec 2006 04:13:41 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 28489 invoked by uid 500); 14 Dec 2006 04:13:41 -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 28475 invoked by uid 99); 14 Dec 2006 04:13:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2006 20:13:41 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [74.52.162.130] (HELO mx11.mesanetworks.net) (74.52.162.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2006 20:13:30 -0800 Received: (qmail 26258 invoked by uid 509); 13 Dec 2006 21:13:39 -0700 Received: from 65.175.0.109 by mx11.mesanetworks.net (envelope-from , uid 508) with qmail-scanner-1.25-st-qms (clamdscan: 0.87/2133. spamassassin: 3.0.6. perlscan: 1.25-st-qms. Clear:RC:1(65.175.0.109):. Processed in 0.104894 secs); 14 Dec 2006 04:13:39 -0000 X-Antivirus-MESANETWORKS-Mail-From: cocoon@lojjic.net via mx11.mesanetworks.net X-Antivirus-MESANETWORKS: 1.25-st-qms (Clear:RC:1(65.175.0.109):. Processed in 0.104894 secs Process 26249) Received: from 65-175-0-109.static.mesanetworks.net (HELO ?192.168.0.100?) (65.175.0.109) by mx11.mesanetworks.net with SMTP; 13 Dec 2006 21:13:39 -0700 Message-ID: <4580CF4D.6020902@lojjic.net> Date: Wed, 13 Dec 2006 21:13:01 -0700 From: Jason Johnston User-Agent: Thunderbird 1.5.0.8 (X11/20061025) MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: JX and sendmail transformer References: <45805E39.2070202@cc.oulu.fi> In-Reply-To: <45805E39.2070202@cc.oulu.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Andre Juffer wrote: > Hi, > > I need to access one object in a JX generated response which is > requested for by email:body using the src attribute. I have stored this > object in the current session in flow using > cocoon.session.setAttribute("object-name", object). The flowscript then > subsequently passes the control to the sitemap to generate an email that > needs certain information extracted from this object. The email > transformer encounters something similar as the following > > > .... > > I suspect Mark is correct that the http:// call is the source of your problem. The session in which that http call is processed is different than that of the original request, because it's a new client-server call and doesn't have the jsessionid cookie/parameter of the original. A cocoon:// call will execute within the same session context so you'll be able to access its attributes. > > The 'something' is matched in the sitemap by the JX generator which > processes a file containing a line like > ${cocoon.session.getAttribute('object-name').getFoo()} where foo is the > property that is needed in the email message. I am using the src > attribute since I want to generate an HTML-based email message. > > This all works fine (the whole process from begin to end ultimately > results in an email correctly delivered), except that I am not able to > access this property foo (the method getFoo() on the object does > certainly exist). All calls of the form > ${cocoon.session.getAttribute('object-name').getFoo()} result in nothing. > > Is my line of thought correct? Or is there another/better way. I could > do something like > >