cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: How to run the cocoon-blocks-fw-sample block?
Date Thu, 16 Nov 2006 19:17:56 GMT
Rice Yeh skrev:
> Hi,
>  In studying the document 

> <>,

> I like to have a real feeling of it. So I try  the 
> cocoon-blocks-fw-sample block, but got no good luck. Can anyone give 
> me some information on doing this?
One way is to build the trunk an point your webcontainer to 
cocoon-dist-samples. It contains all the blocks, including the blocks fw 
samples. I haven't tested this approach for a while, so I don't know how 
well it works.

Otherwise you can extend the cocoon-webapp pom with a dependency on the 
blocks fw sample:


and rebuild the cocoon-webapp and start jetty:

  $ mvn package
  $ mvn jetty:run

then you point your browser to


and the other examples in the block fw samples. The URI above is handled 
by some different parts of the system. The servlet context:


is handled by the DispatcherServlet and configured in the web.xml

Then the block servlets are Spring managed components that are 
configured in the blocks,,

etc. Each block servlet definition defines a mount path e.g.


Then at last the servlet that is embedded in the the block servlet (e.g. 
the sitemap servlet) gets the remaining part of the uri as path info:


Which will be handled by the sitemap in the directory that the block 
context url points to (using the blockcontext source that I descriobided 
in a mail a few days ago),



View raw message