While I cannot be 100% sure of what is happening to you, here is my experience with use of overlaying the error handling.
I created a JavaEE filter that would "capture" a 302 (moved temporarily) response emitted by sling when handling a vanity url, and then re-emit a 301 that simply forwarded to the original URL which would in turn be handled by the 301.jsp (moved permanently) I created as an overlay. Because I emitted the 301 using the HttpServletResponse "sendError" method, sling was able to capture that, and allow my 301.jsp overlay to handle the request. Given this experience, I believe it depends upon what is emitting the "error" code. My guess is that if "setStatus" is called instead of "sendError", your overlay for 4xx or 5xx or ANY "error" code would never get invoked. Sorry if this does not help. If I think of something else, I will post. -- View this message in context: http://apache-sling.73963.n3.nabble.com/Default-error-handling-tp992189p1003217.html Sent from the Sling - Users mailing list archive at Nabble.com.
