Hi Daniel,

I am playing around with the new blocks protocol and the BlockServlets. I have two blocks A and B, B "inherits" from A and then there is a webapp that uses both blocks. The webapp has the DispatcherServlet configured in the web.xml and the mountPath for the two blocks is defined in the spring-bean config XML file. Now I face two problems:

1) I'd like to configure the mountPath to the blocks in the webapp, because the blocks itself are generic; I have tried it with a properties file manually placed in WEB-INF/cocoon/properties that sets the mountPath:

com.domain.package.blockA.mountPath=foo

But this does not work. How can I override the setting in the bean config XML with a property?

2) The nice development feature of sitemap reloading does not work when working on blocks, because you cannot deploy a block with it's own web.xml (that has the necessary DispatcherServlet). I use the webapp which will use the packaged jars from A and B.

The hurdles here are:
a) the cocoon deployer will overwrite the web.xml with no DispatcherServlet configured b) the blockContextURL should point to the source-folder (like in the sitemap generated by the deployer) so that reloading works on the developer's working directory c) that blockContextURL must be overwritten by the deployer via a property (problem like in 1)

I'd imagine a deployer that recognizes the -Dorg.apache.cocoon.mode=dev and then configures the webapp to work as above. I could do some work on the deployer plugin if those points are resolved.

Another question then arises for the final wiring of blocks: typically I have a root sitemap and mount my different sub-sitemaps there. But when each sub-sitemap is now served via a BlockServlet I must have the DispatcherServlet listening on "/" so that I need a separate BlockServlet serving the root (like /index.html). It would be very cool if one could mount a BlockServlet directly inside the root sitemap.

Alex

--
Alexander Klimetschek
http://www.mindquarry.com


Reply via email to