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

Attachment: smime.p7s
Description: S/MIME cryptographic signature