cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Create cocoon output file from within Cocoon page
Date Mon, 15 Jan 2001 10:44:59 GMT


Thanx for responding, only I still don't see a solution.
Using openconnection i am not able to pass java classes to the XSP page
from which the output should be written to file.

I am working on a large project in which user authentication uses a java
class with some sort of certificate. This java class is used in every XSP
page to generate HTML output and should also be used to generate different
kinds of output: mail body's, catalogue files in pdf style, xml files for a
b2b interface, etc.

In short I need a class that acts like cocoon (with sessions, xsp pages
etc.), but it should be possible to catch the output and put it in a file
or pass it to a method, or.....

The only way I see this working is to reintroduce ProducerFromRequest in my
installation. This way I can use the enginewrapper class again and pass
session (I need to pass a Java class) arguments to the request object. It
will only be used for internal purposes in XSP pages, so i don't think this
will be a security risk.

Any ideas?

Michael Homeijer

                    "Robin Green"                                                        
                    <greenrd@hotm        To:          
          >             cc:                 
                                         Subject:     Re: Create cocoon output file from within
Cocoon page        
                    respond to                                                           
>In a xsp page, i am trying to create an output file. The output file is
>stored on a file system and should be filled with output of an XML/XSL
>If the file is written successfully, the user gets a message in his
>stating that his request was successfully stored.
>The whole mechanism uses session variables to check if the user is logged
>in and has permissions to perform a request.
>Things i tried:
>1. Calling cocoon from the XSP page using the enginewrapper class for the
>command line interface. This way I can pass a request with my session
>variables and I am able to output to a file. This isn't working because
>this approach uses ProducerFromRequest class which is removed from Cocoon
>as stated in the faq.

Thanks for reminding me. I removed the reference to ProducerFromRequest
(hopefully the last remaining reference!)

Note that you can still use EngineWrapper by passing a filename instead of
document, as demonstrated by the command-line Cocoon.main() method, but
has the same problem - no session - and not even any parameters! So it's a
"dirty hack", exactly as it says in the comments.

>2. Using openconnection as stated in the faq to get the output in a stream
>in my xsp page and writing it to a file. This doesn't work either, because
>the XSP page specified in the openconnection url is executed in another
>session in which my user is not logged in. I am unable to pass this
>information to the URL.


Get Your Private, Free E-mail from MSN Hotmail at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message