Installing Cocoon Petstore Block

Posted on 2005-04-23
Last Modified: 2012-05-05
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.
Question by:kirbinator

    Author Comment

    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.
    LVL 29

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    Title # Comments Views Activity
    Filemaker xsl help please 3 50
    Extract data from xml in c# 8 32
    xml read and write 1 53
    Split Records in XML using XSLT 2.0 3 31
    The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now