cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <>
Subject Re: [Portal] Why don't cocoon errors appear in a coplet ?
Date Wed, 03 Mar 2004 11:21:48 GMT
On 03/03/2004 11:47, Carsten Ziegeler wrote:
> Olivier Billard wrote:
>>For some of our pipelines, we don't use the cocoon protocol, 
>>but just a serverpages generator. Renaming a variable in the 
>>XSP to cause a "Language Exception" page, I still have the 
>>content of the coplet empty (but as before the decoration 
>>remains : <title>My title</title>). And I still have the 
>>"correct" error display when calling directly the coplet pipeline.
>>I added
>>   <attribute>
>>     <name>error-uri</name>
>>     <value
>>       xsi:type="java:java.lang.String"
>>   </attribute>
>>in the profiles/copletdata/portal.xml in my coplet and added 
>>a match in the sitemap, in the very beginning to avoid 
>>*/**-like matchings :
>>   <map:match pattern="erreur-coplet">
>>     <map:generate type="notifying"/>
>>     <map:transform src="stylesheets/system/error2html.xslt">
>>       <map:parameter name="contextPath" 
>>       <map:parameter name="pageTitle" value="Resource not found"/>
>>     </map:transform>
>>   </map:match>
>>but I have the same result : the content of the coplet is 
>>void, and it seems that this pipeline is never called.
> You can't use the "notifying" generator there as this is a new
> pipeline call (internally). So you can e.g. use the file generator
> reading a standard error.xml or something like that. 

ok. I changed the pipeline :
   <map:match pattern="erreur-coplet">
     <map:generate src="not-found.xml"/>
       <map:transform src="welcome.xslt">
         <map:parameter name="contextPath" value="{request:contextPath}"/>

but no progress...

>>But it's right that the portal uses the cocoon protocol to 
>>aggregate the various coplet contents. But why doesn't it 
>>detect map:handle-errors branchings ?
> That's how the cocoon: protocol was designed :) (So, again
> has nothing to do with the portal). Now, I'm not sure, but
> it might be possible to change the code of the portal
> coplet adapter, so that it passes the exception into the
> error pipeline so that you can use the "notifying" generator.
> Might be possible.
woutchou ;) !
That very much work for this handling, don't you think ;) ?
Didn't you experiment such a behaviour, using the portal ? If you cause an error (resource

not found, language exception, ...) in a coplet, you have a wide-screen cocoon error ? Or

your "error-uri" attribute pipeline is called for all types of errors ?

When I rename the src of the XSP, the error don't display in the portal, but displays well

when calling the coplet pipeline directly...

Thanks again for your answers, Carsten !


View raw message