You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christophe MALIGORNE <cm...@odaxys.fr> on 2000/09/28 12:19:45 UTC

call cocoon from a servlet

I have a servlet wich call Cocoon to process a document with XSP tags ant to
format it in a PDf document.
Then the serlet send this PDF document via mail.
it works correctly.
But there are 2 drawbacks :
1) A class is  used to generate request parameter sendes to cocon. This is
the CocoonServletRequest.java class supplied with cocoon
sample. it  calls the ProducerFromRequest class. But this class have not yet
to be used for security reasons.
then, how have i to modify thisd class.

2)
My document contains XSP tags. And then, a my XSP page is translated into an
equivalent source program which is then compiled. 
Subsequent requests to my document use not this program directly but rebuild
all.
then, the performance are not very good. 
How change thet ?


Thanks a lot.

Christophe.

Re: call cocoon from a servlet

Posted by Ulrich Mayring <ul...@denic.de>.
Christophe MALIGORNE wrote:
> 
> I have a servlet wich call Cocoon to process a document with XSP tags ant
> to
> format it in a PDf document.
> Then the serlet send this PDF document via mail.
> it works correctly.
> But there are 2 drawbacks :
> 1) A class is  used to generate request parameter sendes to cocon. This is
> the CocoonServletRequest.java class supplied with cocoon
> sample. it  calls the ProducerFromRequest class. But this class have not
> yet
> to be used for security reasons.
> then, how have i to modify thisd class.

I think if you deploy this as a standalone servlet (and restrict access
to this servlet to only your programs calling it), you should be fine
security-wise. cocoon returns the PDF to your program and this cannot
IMHO be manipulated so that it sends the PDF to someone else - unless
you register your classes as a producer in cocoon.properties.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung