On Tue, 17 Dec 2002, Upayavira wrote:

> I have been given some time at work during which I would like to implement a
> CocoonBean (name and much of the below suggested by Vadim). I should have time
> over the Christmas holiday. I would therefore like to try to pin down a spec for it 
>before
> then.
>
> I would propose the following, as a code sample:
>
> CocoonBean cocoon = new CocoonBean("c:/working", "c:/context");
>
> /*** Set up Cocoon instance (optional) ***/
>
> cocoon.setConfigFile("WEB-INF/cocoon.xconf");
> cocoon.setBrokenLinkFile("c:/brokenlinks.txt");
> cocoon.setAcceptOptions("acceptoptions");
> cocoon.setAgentOptions("agentoptions");
>
> cocoon.setPrecompileOnly(false);
> cocoon.setRecursionOn();
>
> /*** Set up logging (optional) ***/
> cocoon.setLogKit("logkitname");
> cocoon.setLogLevel("ERROR");
> cocoon.setLogger("loggername");
>
> /*** Process a single URI and pass results to an output stream ***/
> String URI = "cocoon:/blah/foobar.html?page=1";
>
> File f = new File("foobar.html");
> FileOutputStream fos = new FileOutputStream(f);
>
> cocoon.processURI(URI, fos);
>
> /*** Process a number of URIs, sending the results to a 'destination' ***/
>
> cocoon.addTarget("cocoon:/blah/foobar.html?page=2");
> cocoon.addTarget("cocoon:/blah/foobar.html?page=3");
> cocoon.setDestination(new FileDestination("c:/destination"));
>
> cocoon.process();
>
> cocoon.setDestination(new FTPDestination("c:/localfolder", "ftp.myhost.com", "bill",
> "myPassword", "foo/bar/"));
> cocoon.process();
>
> Unless I hear from anyone, I'll just get on and do it like this.
>
> Also, does anyone know of any decent java FTP client classes?

Look into the jakarta-commons-sandbox/net repository for the FTPClient.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to