> -----Original Message----- > From: Kjetil Kjernsmo [mailto:[EMAIL PROTECTED] > Sent: vrijdag 17 oktober 2008 11:41 > To: [email protected] > 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 [EMAIL PROTECTED] - [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
