The CQ environment where our web application would be hosted is a shared infrastructure. The CQ instance would be used by other websites as well.
Given this scenario, how can we achieve customized error pages (404.jsp, 403.jsp etc) for our web application?
CQ mandates the sling folder to be placed under /apps and not within our application folder /apps/<xyz>.
Currently, the one option we are thinking about it to have the logic within the 403 and 404 jsps to identify the application based on the URL and then include an application specific error jsp. This would ensure a different page is rendered for each application.
Is this option recommended or are there any other better/standard practices to achieve this?
Please let me know if you need further information.
Thanks and Regards,
Is it possible for you to use SSI ? If so, Make the 404.jsp to write out the appropriate ssi based on given rule, then ssi will include the right errorPagePath , which gets served from cache.