custom 403 error page not loaded by sling in CQ 5.6.1, 404 page loaded instead
Hi, I am trying to trigger a custom 403 error page in CQ based on the respective error code. First of all, as mentioned in the adobe docs, I couldn't find the 403.jsp page in /libs/sling/servlet/errorhandler/ . It only had the 404.jsp. However I had overridden this page by creating a 404 and 403 jsp pages in /apps/sling/servlet/errorhandler/ and created a default.jsp which handles all the error codes and forward the request to the respective error pages. But even after doing all this, somehow the error code of 403 is not even coming in the errorhandler when an actual 403 happens. I'm getting the 404 error code instead, so cq is loading the 404 error page even when a 403 happens. Can anyone please help me solve this? I want to solve this in the absence of a dispatcher.