Overlaying /sling/servlet/errorhandler on AEM as a Cloud Service | Community
Skip to main content
Level 2
Aug 10, 2022 4:30 AM UTC
Solved

Overlaying /sling/servlet/errorhandler on AEM as a Cloud Service

I'm trying to customize error page redirection by overlaying "apps/sling/servlet/errorhandler" according to this guide: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/developing/full-stack/custom-error-page.html?lang=en

It works well on local AEM instance. But CRXDE editing is not available on AEM as a Cloud Service. Is there any way to deploy/overlap Sling errorhandler codes to /apps within Cloud Service pipeline?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Mohit_KBansal
Mohit_KBansalAccepted solution
Employee
Aug 11, 2022 3:38 AM UTC

After I corrected jsp path, Maven did not install it when testing on my local AEM CRXDE. Maybe there is restriction or something wrong in pom configuration...


Please check filter.xml and make sure this path is included 

/apps/sling

7 replies

arunpatidar
New Participant
Aug 10, 2022 8:05 AM UTC

Hi @ronnie_c 

In case if you are looking for just showing 404 and other custom error pages. You can do this directly at apache server

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-dispatcher-errordocument-url-not-showing-up/m-p/539593/highlight/true#M134037 

Translate
Arun Patidar
Mohit_KBansal
Employee
Aug 10, 2022 4:46 AM UTC

@ronnie_c You need to commit the changes in your code repository and deploy changes to AEMaaCS via Cloud Manager. 

 

Also, have you explored ACS Commons Error page handler capability [1] ?

 

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/error-handler/index.html 

Translate
ronnie_cAuthor
Level 2
Aug 10, 2022 5:08 AM UTC

Thanks for replying. I've checked out ACS Commons Error Page Handler. It also needs to create overlay jsp files under /apps.

Do you know at which directory or path I should put jsp file in code repository to make mvn install or pipeline deploy correctly? I've tried at "/ui.apps/src/main/content/jcr_root/apps/servlet/errorhandler" but it doesn't work.

Translate
Mohit_KBansal
Employee
Aug 10, 2022 5:20 AM UTC

@ronnie_c The path should be 

/ui.apps/src/main/content/jcr_root/apps/sling/servlet/errorhandler/404.jsp
Translate