cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Krulewitz <sh...@mm.st>
Subject Re: Setting status code at pipeline execution time
Date Mon, 27 Sep 2004 10:27:32 GMT
Jorg --

Thanks for the reply.  Unfortunately, this will not work for me since an 
exception thrown by one of the pipelines I'm calling will cause the 
entire request to fail -- which isn't what I want.  I've already solved 
this problem by hacking the SitemapSource to handle the exceptions in a 
different way.

I think I did find a solution to this problem -- I am using the 
following code in one of my sitemap components to set the status code at 
execution time:

Response response = ObjectModelHelper.getResponse(objectModel);
if(response instanceof HttpResponse) {
     ((HttpResponse) response).setStatus(203);
}

 From what I can tell, the SerializeNode will set the status in the 
environment when the pipeline is set up, but at execution time, control 
is handed over to the pipeline itself -- so I'm free to mangle the 
response at this point :)

cheers,
-steve

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


Mime
View raw message