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 Ht...