cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <>
Subject Re: JX and sendmail transformer
Date Thu, 14 Dec 2006 04:13:01 GMT
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
>   <email:sendmail>
>     ....
>     <email:body src="http://my-server/cocoon/something" />
>   </email:sendmail>

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
> <email:body src="http://my-server/cocoon/something?foo=value
> but 'value' contains spaces, so this would not work very well.
> Any help is appreciated,
> Andre
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message