You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by m....@devote.nl on 2001/01/02 11:26:45 UTC
XSP to construct mail body in XSP page
Hi,
In an XSP page we have to construct and send a mail (body should be text).
The same XSP page outputs HTML to a user.
The problem is that I need my session info in the XSP page (user info for
logged in user).
The things I tried are:
- Calling cocoon from an XSP page by creating a URL object and using
openconnection (another session object is used)
- Calling the cocoon engine's handle method from an XSP page (session info
cannot be passed if the output is a stream)
Both ways I cannot pass the info of the current user in a safe way and
intercept the output of the page so that it can be used for the mail body.
Any ideas?
TIA
Michael Homeijer
Re: XSP to construct mail body in XSP page
Posted by Robert Dale <rd...@digital-mission.com>.
On Tue, 2 Jan 2001 m.homeijer@devote.nl wrote:
> In an XSP page we have to construct and send a mail (body should be text).
> The same XSP page outputs HTML to a user.
> The problem is that I need my session info in the XSP page (user info for
> logged in user).
>
> The things I tried are:
> - Calling cocoon from an XSP page by creating a URL object and using
> openconnection (another session object is used)
> - Calling the cocoon engine's handle method from an XSP page (session info
> cannot be passed if the output is a stream)
>
> Both ways I cannot pass the info of the current user in a safe way and
> intercept the output of the page so that it can be used for the mail body.
I don't quite understand, but are you using the sendmail taglib?
I'm able to pass session and user info to it.
xml-cocoon/src/org/apache/cocoon/processor/xsp/library/mail/sendmail.xsl
--
Rob