> From: Liam Morley [mailto:[EMAIL PROTECTED]] On Behalf Of Liam
Morley
> 
> Instead of handling database operations inside an ESQL sheet, I'm
handling
> them inside a homemade transformer. If a request is made for an object
> that doesn't exist in the database, then I want to return a 404.
> 
> For example, if I want to display profiles for people registered in
the
> database, I can map the request to "/members/user_*.html" where {$1}
is
> supplied as a sitemap parameter, and signifies a user's ID. If no user
> exists with that ID, I want to signify a 404. I was hoping
> HttpResponse.sendError() would be enough, but nothing happens when I
do
> this. What is the effect of response.sendError() from inside a
> transformer, and what else is needed? Is there any Cocoon API for this
> sort of thing? I don't see it in the javadocs..

Try "throw new ResourceNotFoundException()" from your transformer, but
*you better do not write anything to the following SAX handler before
this*.

You have been warned ;)

Vadim

> 
> Thanks all,
> Liam Morley


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to