Installing Cocoon Petstore Block

OK... I'm going to sound extemely dumb, but I'm just getting started with working with Cocoon.  I thought if I could install some of the example blocks, they would give me a good starting point as to how best design a web application using Cocoon.  I have done some googling already, and haven't turned up anything useful yet... and anyone using Cocoon should already know that the documentation available is limited.

So, with that said, I have 2 requests.

1.  Can someone direct me as to how to install and run the petstore block provided with Cocoon 2.1.7.  I have Cocoon up and running already.  I guess I need some assistance on how to build and deploy the block.
2.  If anyone is somewhat familar with additional books or documentation available, that would be extremely helpful.  I already own two books on Cocoon, but they are a little bit out of date.  And unfortunately, I do not find the Apache documentation very fluid... meaning it is somewhat choppy and you end up spending oddles of time sifting through it make any sense of it.

Thank you in advance for any assistance you can provide me.
Who is Participating?
bloodredsunConnect With a Mentor Commented:
Glad to hear you have it up and running!

My department has just moved over to Cocoon for one of your projects and we've found that there is a real lack of decent books. Our general reference is "Cocoon Developers Handbook" which you already have and it probably the best of a fairly average bunch. As you mention, the online stuff is pretty thin too. In many cases, we've had to resort to hacking the source code so that things like Stored Procedures can be called by the SQLTransformer on a DB other than Oracle, because almost all the documention in this area says "to do"!!! I'm sure you've already seen it, but the main source for docs can be found at  and at, both of which are a bit thin.

One to avoid is "Professional Xml Development with Apache Tools: Xerces, Xalan, Fop, Cocoon, Axis, Xindice (Wrox Press) " which is pretty dire, it just skims over the technologies without any useful depth. I bought this from the reviews on (where it outsells the 2 books you have) and regret it. There's a chapter in "Java and XML" but it's very much written as an aside and not suitable for development, just for overview.

Sorry I can't be of any more help, but Cocoon is still a maturing product and doesn't have that much developer momentum.
kirbinatorAuthor Commented:
After some fussing around on my own, I was able to get the Petstore block up and running.  It was actually a lot simplier than I originally thought.  Here are the steps I took to get this up and running correctly:

1.  Made a copy of, and renamed the copy to  You can find this in the root directory of cocoon-2.1.7.
2.  Uncommented the following blocks and set them equal to "true"... databases, hsqldb, velocity, forms, and petstore.
3.  Reran the Ant build script from a command prompt.
4.  Restarted Tomcat.

Woola... I was up and running.  I used the following URL to access the Petstore... http://localhost:8080/cocoon/samples/blocks/petstore/

So all that remains... and it's still worth 500 points... is some good books (which I doubt is available) or online documentation (which I still doubt is available but more likely than the books).  Remember, I already own Cocoon Developers Handbook and Cocoon: Building XML Applications.

Thanks again for your assistance in advance.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.