Dominic Tootell wrote:
Hi there,
Is it possible to have 2 cocoon blocks that map to the same mount-path
in src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml? i.e.
Block 1:
<bean name="com.bbc.cmc.cmc-block1.service"
class="org.apache.cocoon.sitemap.SitemapServlet">
<servlet:context mount-path="/"
context-path="blockcontext:/cmc-block1/"/>
</bean>
Block 2:
<bean name="com.bbc.cmc.cmc-block2.service"
class="org.apache.cocoon.sitemap.SitemapServlet">
<servlet:context mount-path="/"
context-path="blockcontext:/cmc-block2/"/>
</bean>
I've tried to get it working but so far with no success. Is there a
property I can set on the beans to allow this? Or is it just not
architecture possible in 2.2?
You can't mount two servlet-services at the same mount path. I guess
that you want to make one servlet-service extend another
servlet-service. This can be done by declaring a "super" connection:
<bean name="com.bbc.cmc.cmc-block1.service">
<servlet:context
mount-path="/cmc-block1"
context-path="blockcontext:/cmc-block1/">
</servlet:context>
</bean>
<bean name="com.bbc.cmc.cmc-block2.service">
<servlet:context
mount-path="/"
context-path="blockcontext:/cmc-block2/">
<servlet:connections>
<entry key="super" value-ref="com.bbc.cmc.cmc-block1.service"/>
</servlet:connections>
</servlet:context>
</bean>
If com.bbc.cmc.cmc-block2.service can't provide a resource, its parent
(com.bbc.cmc.cmc-block1.service) is asked for it.
HTH
--
Reinhard Pötz Managing Director, {Indoqa} GmbH
http://www.indoqa.com/en/people/reinhard.poetz/
Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member [EMAIL PROTECTED]
________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]