On 27.06.2007 15:13, Tobia wrote:

        cocoon.sendStatus(404)
        cocoon.response.setStatus(404)
        cocoon.response.sendError(404)
        throw new Packages.java.io.FileNotFoundException()
        throw new Packages.org.apache.cocoon.ResourceNotFoundException("")

The problem with the (send|set)(Status|Error) is that they don't invoke
the exception handlers defined in the sitemap.  The problem with
throwing new exceptions is that they are wrapped in a JavaScriptException
and thus are reported as a 500 error, while I need a 404.

Did you have a look at the documentation [1]? It talks about "unrolling" an exception. Does this work?

Joerg

[1] http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

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

Reply via email to