cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject HTTP error codes
Date Wed, 16 Apr 2003 14:31:06 GMT
Hi All

Is this the right way to send explicit HTTP error codes, with the new 
error-handler? It works, but I just want to make sure it is intended 

  <map:select type="exception">
   <map:when test="not-found">
    <map:generate src="not-found.xml"/>
    <map:transform src="welcome.xslt"/>
    <map:serialize status-code="404"/>
    <map:generate type="notifying"/>
    <map:transform src="stylesheets/system/error2html.xslt">
     <map:parameter name="contextPath" value="{request:contextPath}"/>
    <map:serialize status-code="500"/>

I need this as we have Apache using 'ProxyErrorOverride On' on our 
production box (but not on the dev box), so users see 'pretty' errors 
and developers get stacktraces.

Without the status codes, Cocoon always sends a 200.


regards Jeremy

View raw message