cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Burton" <>
Subject Playing with Cocoon 2
Date Tue, 04 Apr 2000 00:50:15 GMT

I've finally started actually playing with Cocoon 2 - rather than checking
it out of the CVS and glacing at the interfaces... :-)

First, a simple build problem: (and probably build.bat though I
haven't looked) need to have the path to the SVG jar in.

Anyway, I decided to learn the Cocoon 2 model by actuallty writing stuff for
it - I recall Stefano mentioning that the /Cocoon.xml page is not present in
Cocoon 2 yet, so I decided to write one as a generator (this way I learn the
architecture and get experience with SAX). However, I was feeling lazy and
did not want to have a battle with JServ over classpaths etc, so first of
all I had to make Cocoon 2 work from the command line.

Warning: what I produced is a complete hack and is incomplete.  Over the
next week I'll finish it, but it works, which is all I need at the moment (a
single request is taken from the command line arguments, the result is
output to System.out and any messages/headers are output to System.err).
 Ah - the satisfaction of running Cocoon 2 and seeing the Hello page.
DirectoryGenerator is nifty too.

Back to StatusGenerator.  I entered it in the sitemap like this at first:

     <process uri="status">
        <generator name="status"/>
        <serializer name="xml"/>

But it didn't work - it seemed logical to me that a generator which
generates its content on the fly doesn't need a source.  I hacked around it
like so:

     <process uri="status" source=".">
        <generator name="status"/>
        <serializer name="xml"/>

(maybe I'm missing something rather obvious - I am tired and still learning
the new interfaces (esp. the sitemap stuff - complex stuff man!)

Anyway, back to the point of this.  I managed to get my own generator
running which displays the page "<status></status>", which is a start.  I
then hunted through the component manager interfaces but could not find
anything to get an enumeration over all of the loaded components.  Is there
a method I am missing totally or shall I add it and mail the patches?

Ross Burton

View raw message