cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Neu" <peter....@gmx.net>
Subject AW: How to use cocoon servlet only for rendering documents?
Date Tue, 14 Feb 2006 10:42:21 GMT
Yes, that sounds good. 
Your are refering to the jakarta commons httpclient library?

I suppose a one way communication will suffice for the first iteration. I'm
thinking of just sendig the usual http attachment header back from cocoon
instead of from my client code. So the user will only see the url in the
attachment window.

Cheers,
Pete



-----Ursprüngliche Nachricht-----
Von: Bertrand Delacretaz [mailto:bdelacretaz@apache.org] 
Gesendet: Dienstag, 14. Februar 2006 10:58
An: dev@cocoon.apache.org
Betreff: Re: How to use cocoon servlet only for rendering documents?

Le 14 févr. 06, à 10:40, Peter Neu a écrit :

> ...I have the use case that I want to combine Cocoon with another 
> framework say
> Struts (there is lots of legacy code). I want to do all the web front 
> end
> work with Struts and do the rendering of pdf, xml, excel etc with 
> Cocoon...

A nicely decoupled way of doing this is by using an HTTP client in your 
Struts (or whatever) code: run Cocoon in a separate servlet, even on a 
different host if it's useful, and have your other module send XML data 
to Cocoon via HTTP POST, receive the results and proxy them to the web 
client.

You could use the httpclient java library to do this, it's not that 
much code to write, and if you do it right you can keep it all 
streaming without having to buffer data in memory, so it would be 
efficient (not as much as a more tightly coupled solution, but if 
you're talking about generating PDF it's not the communications costs 
that will be a problem).

Such a client could be a welcome addition to Cocoon, if you want to go 
this route I'll try to find some time to help and possibly integrate 
the client in a future relelase.

-Bertrand



Mime
View raw message