cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: handling non-matched pipelines
Date Tue, 10 Feb 2004 10:52:36 GMT
Sorry forgot to mention that I'm still using the golden-oldie 2.0.4 
release. The exception selector appears only in the 2.1.x docs.


Stephan Coboos wrote:

> Jorg Heymans wrote:
> 
>> I might be blind and having an off-day, but is there any other way of 
>> trapping non-pipeline matches other than
>>
>>     <init-param>
>>       <param-name>manage-exceptions</param-name>
>>       <param-value>false</param-value>
>>     </init-param>
>>
>> in web.xml?
>>
>> I need to return 404 on all pipeline errors to downstream systems, 
>> pipeline errors are fine using
>>
>>     <map:handle-errors>
>>         <map:serialize type="xml" status-code="404"/>
>>     </map:handle-errors>
>>
>> Thoughts?
>> Jorg
>>
>>
> Did you tried the ExceptionSelector?
> 
> An untested example:
> 
> ...
> <map:selector name="exception" 
> src="org.apache.cocoon.selection.ExceptionSelector">
>   <exception name="fileNotFound" class="ResourceNotFoundException" 
> unroll="true"/>
> </map:selector>
> ...
> <map:pipeline>
>   ...
>   <map:handle-errors>
>      <map:select type="exception">
>         <map:when test="fileNotFound">
>            ...
>            <map:serialize type="xml" status-code="404"/>
>         </map:when>
>   </map:handle-errors>
> </map:pipeline>
> ...
> 
> Regards
> Stephan


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


Mime
View raw message