Expand my Community achievements bar.

Create Custom error pages in aem

Avatar

Level 7

The focus of the article is to understand the functionality of Error handler and creating custom error pages using acs-commons error handler. Using acs-commons error handler we can create custom error pages in easier steps with least code involved.

In this article we will see :

  • Steps to configure the acs-commons error handler
  • Testing error handler functionality
  • Error Handler considerations

Read more at AEMCQ5Tutorials: Custom error pages using ACS-Commons Error Handler http://www.aemcq5tutorials.com/tutorials/adobe-aem-cq5-tutorials/custom-error-pages-acs-commons-erro...

5 Replies

Avatar

Employee

Nice Article Ankur. Error pages are not cached by the dispatcher. It would be nice if you could add caching strategies available for the error pages.

Regards,

Abhishek

Avatar

Level 1

Hi Abhishek,

Thanks for the input!

Acs-Commons Error Handler comes with In-Memory TTL based cache, which can be enabled in the sling:Osgi configurations of the Error Handler. Also we are setting the DispactherPassError to "0", so all the erring requests are sent back to AEM. Therefore our custom error pages load without displaying the Apache Error.

Regards

Prathyusha

Avatar

Level 10

prathyusham0990prathyusham0990

He is referring to the caching strategy at dispatcher not in-memory cache at AEM.

Unless the page is back on publisher, all request to that page will be going to AEM. He is looking for a way to cache 404 state of that page at dispatcher for that time period

@abhishek

Since its, purely based in ACS Commons, you might want to create a issue at [0] or check with Justin or David

[0] https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues