cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Some Cocoon-Hacks [Was: Re: Best way to include ouitput of one page into another?]
Date Fri, 31 Mar 2000 09:47:46 GMT
"Zisch (Matthias Meier), NetHorizon AG" wrote:

> > Now... you could place pipeline information inside your page, and this
> > is a -1 from me. But if you want to do something like
> >
> > <page>
> >  <cocoon:include src=°./banner" force-user-agent="cocoon">
> >  ....
> > </page>
> >
> > or something like this, I see no problems.
> This was exactly what I thought about! (A typical example would be page-headers
> and -footers, navigation-panels etc. which are reused across several pages --
> no need to say that the "copy-and-paste-approach" is not really desirable for
> such stuff. :-)
> [...]
> > We already thought about implementing the XInclude spec... I think this
> > is better than having cocoon-specific namespaces but it might not have
> > all the semantics we'd like to have like encoding, fake user-agent,
> > parameters and such...
> I don't know (yet ;-) XInclude, but in any case, I would also vote to use an
> existing and established specification, rather than to do something
> Cocoon-specific!

I believe that XInclude is what we need.

> > what do others think about this?
> >
> > > >> Again: Objections? Comments? Better ways to do it??
> > > >
> > > >Tomcat provides exactly such hooks. I believe that Cocoon, being a
> > > >servlet should "inherit" all the features that are necessary to
> > > >servlets... but I admit I haven't really thought about it that much, and
> > > >I'm always open to alternatives if they are necessary.
> > >
> > > We are currently using JServ, so I was not aware of this possibility in
> > Tomcat.
> > > I will certainly have a look at it. Thanks for pointing it out!
> >
> > Look into Catalina (which is Craig's own try for Things
> > like Tyrex ( have been using these tomcat-specific
> > hooks to implement session transaction on top of tomcat. They were
> > designed to do what you wanted to do... I believe.
> [...]
> I couldn't find something about "Catalina" or these Tomcat-Hooks -- can someone
> give me a hint where to search?

download the jakarta-tomcat CVS module from, there
you'll find the catalina directory and the current tomcat source. Or
download Tyrex + Tomcat from and see how they did it.

> Yeah, well ... I actually have no doubt it _could_ be done, but it's always the
> same thing with these commercial projects: you never have the time to do
> something right, and in the end most of the software you write ends up in a
> bunch of dirty hacks. :-( :-( :-(
> I looked through the Cocoon 2 sources and my conclusion is, that it would
> probably need much more work for me to get a clean implementation of the
> inclusion-functionality into it, than doing some dirty hacks on Cocoon 1. (I
> think, I can get away with hacking the Engine class in Cocoon 1, while the
> architecture of Cocoon 2 is -- no wonder -- quite different and somewhat more
> complex.)
> So, this is my plan:
> I intend to do the hacks on Cocoon 1.7 (page-inclusion, probably also the
> event-hooks etc.) which I originally planned to do, to get our shop-software
> working on Cocoon as soon as possible. Since it would be impossible
> (page-inclusion) or unwanted (hooks) to include these hacks into Cocoon 2, I
> don't even need to do something clean or clever -- it just has to work, so that
> our customer is satisfied with it ;-), which makes it somewhat easier for me,
> to do it in time.

> If someone really would like to get these hacks, just send me an email. But I
> absolutely want to make clear, that these are temporary, dirty hacks to get our
> own project finished in time! It's not in any way an attempt to fork Cocoon, and
> I will also not have the time to document these hacks or give otherwise
> support! (Therefore, I won't post the modified source or otherwise make it
> public, unless someone requests them.)

cool, no problems with that... and if people _really_ like them, I might
integrate them into Cocoon... it will depend on user feedback, so let us
know when you're done, please.
> I'm really not happy about this, but I don't see any other possiblity for our
> first step with Cocoon. Since this project is critical for the future
> existence of our company, I cannot risk any experiments at this time! If no bad
> things happen, we should be able to finish the project in time whithin the next
> three months.

I agree with you.
> During this time, I will try to follow the Cocoon mailing lists, understand
> the Cocoon 2 source code, learn more about Castor, Tomcat etc.
> I hope that I will then see, how to make the next step, which should be porting
> our shop-software from the hacked Cocoon 1 to a "regular" Cocoon 2, probably
> using the Tomcat-Hooks, Castor and the like.

expect that this will take some time.
> If no one implements the inclusion-functionality up to then, I should then have
> the time to do a clean implementation for Cocoon 2 (probably based on XInclude).

> But I actually don't want to make any promises at the moment, since at the end
> of June my three-months summer-vacation start, which I really long for, since
> the last three years in this startup-company were somewhat tough. I probably
> should spend some time of the vacations for non-IT-related stuff (for example
> for my girl-friend, who was very patient with me the last few years ;-),
> however, since my job is also my hobby, I think, that I will use one or the
> other hour to contribute to Cocoon.
> After that vacation, I'll start to study IT at the ETH Zurich. (After doing
> software-engineering in practice for the last years, I thought, it would be
> nice to actually _learn_ it. :-) I will also have to do some work for
> NetHorizon, to make the money I need to live. Last but not least, I thought
> about eventually starting my own Open-Source project. (For example, I really
> would like a Rational-Rose-like tool, but written in Java and with an
> Open-Source license. What I found on the web last time I searched, didn't
> really satisfied me, so maybe, I'll write my own Open-Source-RR in Java.)

have you seen Argo UML? OSS java rational-rose clone (under, someplace)
> I'm just telling you all this to point out, that I cannot make any promises
> about how much I can and will contribute to Cocoon in the future, although I
> surely _want_ to contribute as much as possible. And since NetHorizon will
> certainly use Cocoon for most of its future projects, I will certainly stay in
> touch with it.

Cool, whenever you want to help, you'll be welcome!

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message