cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanne Moa <hanne....@uninett.no>
Subject Re: Cocoon 2.2 - Block name required in file path?
Date Thu, 11 Oct 2007 10:18:42 GMT
Hugh Sparks wrote:
>> From: "Joerg Heinicke" <joerg.heinicke@gmx.de>
>>
>> I didn't know it but I saw today the thread about "mounting a block at
>> root level". So in case you missed it:
>>
>> http://marc.info/?t=119202558600004&r=1&w=4
> 
> The information at that link 

... which is the bottom of <http://cocoon.apache.org/2.2/1362_1_1.html>.
The file mentioned there, block.xml, does not exist...

> is no longer accurate for Cocoon 2.2,
> but it was close enough to help me fix my problem.
> 
> In case others would like to mount a block at the root level, the correct
> procedure is to edit the file:
> 
>    myBlock1\src\main\resources\META-INF\cocoon\spring\servlet-service.xml
> 
> This file contains an element:
> 
> <bean id="mysite.com.myBlock1.service" class="org.apache.cocoon.sitemap.SitemapServlet">
>     <servlet:context mount-path="myBlock1" context-path="blockcontext:/myBlock1/"/>
> </bean>
> 
> To mount the block at the root level, you change the mount-path
> attribute in the
> servlet:context element to be an empty string:

Changing mount-path to either of "" or "/" works, actually.


HM

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message