cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fel...@apache.org>
Subject Re: blockcontent bug ?
Date Thu, 12 Jul 2007 13:27:48 GMT
Jean-Christophe Kermagoret schrieb:
> Thanks for the reply,
>
> I thought it was blockcontext role.
> Why using servlet instead ?
> Is blockcontext useful anymore in sitemaps ?

I'm not sure, but I think this has changed because blocks-fw is already
deprecated and servlet-service is the new one.
Maybe Grzegorz can give more information about this.

>
> JC
>
> Felix Knecht a écrit :
>> Jean-Christophe Kermagoret schrieb:
>>  
>>> No answer from users@c.a.o, try dev@c.a.o
>>>
>>> Hi,
>>> I'm using C22 from trunk svn :
>>>
>>> I have created blocks through archetypes :
>>> * cms
>>> * common
>>> * locator
>>>
>>> 1) Block definitions
>>>
>>> They all define public blocks through
>>> META-INF/cocoon/spring/servlet-service.xml
>>>
>>> In cms/META-INF/cocoon/spring/servlet-service.xml, I have :
>>>      <bean id="org.openbluelab.cms.block"
>>> class="org.apache.cocoon.sitemap.SitemapServlet">
>>>        <servlet:context mount-path="/content"
>>> context-path="blockcontext:/cms/"/>
>>>      </bean>
>>>
>>> In common..., I have :
>>>      <bean id="org.openbluelab.common.block"
>>> class="org.apache.cocoon.sitemap.SitemapServlet">
>>>        <servlet:context mount-path="/common"
>>> context-path="blockcontext:/common/"/>
>>>      </bean>
>>>
>>>     
>>
>> I think the servlet connections are missing. To get stuff from cms block
>> in commons block this should look like
>>
>> <bean id="org.openbluelab.common.block"
>> class="org.apache.cocoon.sitemap.SitemapServlet">
>>   <servlet:context mount-path="/common"
>> context-path="blockcontext:/common/" >
>>     <servlet:connections>
>>       <entry key="cms" value-ref="org.openbluelab.cms.block"" />
>>     </servlet:connections>
>>   </servlet:context>
>> </bean>
>>
>>  
>>> In locator, I have :
>>>      <bean id="org.openbluelab.locator.block"
>>> class="org.apache.cocoon.sitemap.SitemapServlet">
>>>        <servlet:context mount-path="/locator"
>>> context-path="blockcontext:/locator/"/>
>>>      </bean>
>>>
>>> 2) Sitemaps
>>>
>>> In cms/COB-INF/sitemap.xmap, I have the following snippet :
>>> ...
>>>            <map:match pattern="config/conf.xml">
>>>                <map:generate src="docs/config/conf.xml"/>
>>>                <map:serialize type="xml"/>
>>>            </map:match>
>>> ...
>>>
>>> ==> /content/config/conf.xml returns expected xml
>>>
>>> In common/COB-INF/sitemap.xmap , I have the following snippet :
>>> ...
>>>            <map:match pattern="test">
>>>                <map:generate
>>> src="blockcontext:/content/config/conf.xml"/>
>>>                <map:serialize type="xml"/>
>>>            </map:match>
>>>     
>>
>> And this should look like
>>
>> <map:match pattern="test">
>>   <map:generate src="servlet:cms:/config/conf.xml"/>
>>   <map:serialize type="xml"/>
>> </map:match>
>>
>>
>> It may also help to read the cforms migration guide what can give you an
>> idea of how it works.
>> http://cocoon.zones.apache.org/dev-docs/2.2/blocks/forms/1.0/1351_1_1.html
>>
>>
>> HTH
>> Felix
>>
>>   
>
>


Mime
View raw message