cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasha Joachimsthal" <j.joachimst...@onehippo.com>
Subject RE: Send status code with error handler
Date Fri, 17 Oct 2008 09:50:36 GMT
 

> -----Original Message-----
> From: Kjetil Kjernsmo [mailto:Kjetil.Kjernsmo@computas.com] 
> Sent: vrijdag 17 oktober 2008 11:41
> To: users@cocoon.apache.org
> Subject: Send status code with error handler
> 
> Hi all!
> 
> I have a very simple exception handler in my sitemap:
> 
>     <map:selectors>
>       <map:selector name="exception" 
> src="org.apache.cocoon.selection.ExceptionSelector">
> 	<map:exception name="processing" class="java.lang.Exception"/>
>       </map:selector>
>     </map:selectors>
> 
> so that the user will never see a stacktrace.
> 
> We have a servlet service listening in a different sitemap, 
> the setup looks like this:
> 
>       <map:handle-errors>
> 	<map:generate src="servlet:skin:/resources/errors/general.xml"/>
> 	<map:serialize type="servletService" status-code="500">
>           <map:parameter name="service" 
> value="servlet:skin:/sublima-styling"/>
> 	</map:serialize>
>        <map:serialize type="html"/>
>       </map:handle-errors>
> 
> This works great, except for one thing: I still want to send 
> the 500 HTTP code, even though the user gets a pretty page. 
> I've tried to set the status-code attribute on both 
> map:serialize elements, but it doesn't work. 
> 
> How is this supposed to work?

<map:serialize type="html" status-code="500" />


Jasha Joachimsthal 
 
j.joachimsthal@onehippo.com - jasha@apache.org
 
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646


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


Mime
View raw message