Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEM Cloud Service - Authorable Error Pages and Dispatcher Error Directives | AEM Community Blog Seeding

Avatar

Administrator

4/11/23

BlogImage.jpg

AEM Cloud Service - Authorable Error Pages and Dispatcher Error Directives by Sreekanth Choudry Nalabotu

Abstract

Goal
AEM 2023.3.11382.20230315T073850Z

For showing Custom Error Pages on Publish, say for a 404, you can follow product documentation and create the page in /apps/sling/servlet/errorhandler. However if you want to give some flexibility to the authoring team for some creative error pages, basically Authorable Error Pages, they can be created as normal pages and published. With some Dispatcher Configuration they can be served as Error Pages

Solution
1) Create a sample project to test the Dispatcher Error Directives..

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=36 -D aemVersion="cloud" -D appTitle="Experience AEM Dispatcher Error Directives" -D appId="eaem-dispatcher-error-directives" -D groupId="apps.experienceaem.sites" -D frontendModule=none -D includeExamples=n -D includeDispatcherConfig=y



2) Create a regular page in AEM (may be in a specialized structure like /content/eaem-dispatcher-error-directives/us/en/tools) for showing errors like 404 Not Found, publish them..



3) Copy eaem-dispatcher-error-directives\dispatcher\src\conf.d\available_vhosts\default.vhost and create eaem-dispatcher-error-directives\dispatcher\src\conf.d\available_vhosts\eaem.vhost

Read Full Blog

AEM Cloud Service - Authorable Error Pages and Dispatcher Error Directives

Q&A

Please use this thread to ask the related questions.