cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Guillard <pguill...@citycita.net>
Subject Error handling for portal coplets ?
Date Wed, 18 May 2005 03:24:47 GMT
Hi all,

Is it possible to use sitemap error handling in coplet contents ? How?

I have a cachingURI coplet that gets information from another servlet. 
If this information is not available i want to give information to the 
user instead of the "The coplet XXXX is currently not available.".

I handle error java.io.IOException exception in the sitemap like this OK :
<map:pipeline>
    <map:match pattern="external">
            <map:generate type="html" src="http://external-file"/>
            <map:serialize type="xhtml"/>
    </map:match>
    <map:handle-errors>
            <map:generate src="notavailable.xml"/>
            <map:serialize/>
    </map:handle-errors>   
</map:pipeline>

Then i put this in a cachingURI coplet, this is the temporaryUri pipeline :
<map:match pattern="application-external">
    <map:generate 
src="{coplet:temporaryAttributes/application-uri}?copletid={coplet:#}"/>
    <map:transform type="xslt" src="cleanhtml.xsl"/>
    <map:transform type="portal-html-eventlink">
        <map:parameter name="attribute-name" value="application-uri"/>     
    </map:transform>
    <map:serialize type="xml"/>
</map:match>  

If the file is not found i don't get my error handled, but the usual 
message :
The coplet external-1 is currently not available.

Regards,

Phil

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


Mime
View raw message