You are just setting the 500 status, which is not picked by your error
handler(which is wrongly implemented of course) , actually the sling
"default" error handler kicks in and sends the "Internal Server
Error".you have two options:// 1.A 500.jsp script can be created.
However, it is only used if HttpServletResponse.sendError(500) is
executed explicitly; i.e. from an exception catcher.Otherwise, the
response code is set to 500, but the 500.jsp script is not executed..You
are not doing this in yo...