Nothing seems to be working. Here's the contents of my servlet-servlet.xml for block3.
<bean id="block3" class="org.apache.cocoon.sitemap.SitemapServlet">
<servlet:context mount-path="/block3" context-path="blockcontext:/block3/">
           <servlet:connections>
               <entry key="block1" value-ref="block1.id" />
           </servlet:connections>
       </servlet:context>
</bean>

Here's the sitemap
<map:match pattern="*">
      <map:aggregate element="root">
           <map:part src="servlet:/block1/somefile.blck1"/>
      </map:aggregate>
      <map:serialize type="xhtml"/>
</map:match>

And here's servlet-service.xml for block1:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:servlet="http://cocoon.apache.org/schema/servlet"; xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd";>
   <bean id="block1.id" class="org.apache.cocoon.sitemap.SitemapServlet">
<servlet:context mount-path="/block1" context-path="blockcontext:/block1/" />
   </bean>
</beans>


This is the exception:

javax.servlet.ServletException: org.apache.cocoon.ProcessingException: Failed 
to process pipeline
        at <map:serialize type="xhtml"> - 
file:///opt/Programs/apache-tomcat-6.0.14/work/Catalina/localhost/cocoon/blocks/block3/sitemap.xmap:9:38
        at <map:match> - 
file:///opt/Programs/apache-tomcat-6.0.14/work/Catalina/localhost/cocoon/blocks/block3/sitemap.xmap:5:30
        

I am missing something, but what is't? Any Idea ?






Alessandro Vincelli wrote:
If you are using cocoon blocks, the syntax is not correct , try with:

<map:aggregate element="root">
    <map:part src="servlet:/block1/somefile.blck1"/>
</map:aggregate>

and check [1].

Ciao
Alessandro

[1] http://cocoon.apache.org/2.2/1291_1_1.html




Mansour Al Akeel wrote:
Thank you, I am trying it now, but getting errors. I think it's with block communications.

When I put this in my site map:
<map:aggregate element="root">
     <map:part src="cocoon:/block1"/>
</map:aggregate>

I get java.lang.StackOverflowError
If I do this:
<map:aggregate element="root">
     <map:part src="cocoon:/block1/somefile.blck1"/>
 </map:aggregate>

javax.servlet.ServletException: org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: block1/somefile.blck1

By the way, I can access http://localhost:8080/cocoon/block1/somefile.blck1 with no any problems !



Alessandro Vincelli wrote:
Very simple code, may be it can help you.

<map:match pattern="aggregate">
     <map:aggregate element="root">
       <map:part src="cocoon:/block1 />
       <map:part src="cocoon:/block2" />
     </map:aggregate>
     <map:serialize type="xhtml" />
</map:match>

<map:match pattern="block1">
       <map:generate src="block1.xml" />
       <map:transform src="block1.xsl" />
       <map:serialize type="xml" />
</map:match>

<map:match pattern="block2">
       <map:generate src="block2.xml" />
       <map:transform src="block2.xsl" />
       <map:serialize type="xml" />
</map:match>
Thank you for your reply. I need to aggregate fragments after the transformation. The examples are very useful but they show how to aggregate the xml docs into one then transforming them. For example, if I have two separate blocks, each of them generates html page, I need to put them in one single page after the html is generated. Is this possible?


Alessandro Vincelli wrote:
You can use <map:aggregate>[1] there are some example on cocoon.zones.apache.org[2]
Bye
Alessandro

[1] http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html
[2] http://cocoon.zones.apache.org/demos/trunk/samples/core/aggregation/
Hello:
I am wondering if there's a tutorial or example that shows how to aggregate multiple fragments into one page. I have few blocks, each of them generates part of the web page. I need to put the results into one single page. is this possible ? How? is there any tutorials or examples ?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to