cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fawzib Rojas <>
Subject Cocoon 2.2 block+sitemap question
Date Tue, 02 Nov 2010 13:43:56 GMT
I have 2 blocks (block-a and block-b) and I want to serve an xml from 
block-b in block-a so i did the following:

<servlet:context mount-path="/block-a" 
<entry key="block-b" value-ref=""/>

<map:match pattern="document">
<map:generate src="servlet:block-b:/document" />
<map:serialize type="xml" />

That way i can read the my document using /block-a/document.  In certain 
instances block-b wont be included in the war so I want the 
/block-a/document to go to a default document in block-a so I thought of 
adding an error handler, something like this:

<map:match pattern="document">
<map:generate src="servlet:block-b:/document" />
<map:serialize type="xml" />
<map:select type="exception">
<map:when test="error">
<map:generate type="file" src="block-a-resources/document.xml" />
<map:serialize type="xml"/>

Since the connection in the block-a/block-servlet-service.xml cannot be 
made the war is not loaded so this method wont work. Is there another 
way to do this?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message