cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Form submit to Cocoon to E-mail?
Date Tue, 08 Feb 2000 15:00:04 GMT
COFFMAN Steven wrote:
> I wrote a system, using Cocoon, for converting HTML form submissions into
> PDF documents which are then e-mailed to the proper person. The java servlet
> that processes the form result writes out an XML file. It then makes an HTTP
> request to tell Cocoon to translate it into PDF. The PDF result of the
> request is packaged as an e-mail to the person who handles those things.
> My question is this: My approach seems like a silly Rube-Goldberg
> contraption. Is there something really dumb I'm missing?
> It feels like I'm swimming upstream by using Cocoon in reverse like this.

Yeah, kind of.

In a perfect world, you would process an http request with a servlet,
then send the requested XML message to James
( where Cocoon, acting as a mail filter,
will process the XML to PDF and send it to the desired recipients.

Cocoon as an http servlet should be used to process what you are sending
back to the user, while cocoon as a mail filter should be used to
process an incoming message to the recipient.

This is, generally, the difference between http servlets and mail
filters. This is why you feel you're swimming upstream: you're doing it.

Anyway, Niclas is pushing very hard to allow us to abstract the Cocoon
architecture so that things like these are possible. I agree with him
that Cocoon should work both ways and have several hooks that are not
entirely based on the servlet API.

How this is possible, I can't really tell at this point, but we'll get

BTW, James is _almost_ ready for prime time. When that happens, I'll
create a Mail Filter out of Cocoon. That will take care of your cases
doing something like this

  request -> producer -> processor -> formatter -> response (user
                +-> mail -> processor -> formatter -> mail (recipient

Am I making any sense?

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------

View raw message