404 error handling | Community
Skip to main content
New Participant
May 26, 2016
Solved

404 error handling

  • May 26, 2016
  • 4 replies
  • 4059 views

Hi,

I have added custom error scripts in /apps/sling/servlet/errorhandler(404.jsp,default.jsp).

If I try to request below page on AEM 6.1 instance which doesn't exist:

https://localhost:4502/es_ES/hello  -    my personalized 404 page is displayed.

But if i request below page :

https://localhost:4502/hello            -    no error is showing up. Page is coming blank.

In httpd.conf i am configuring my error document like below:

<LocationMatch> \.html$

ErrorDocument <path of the error page>

</LocationMatch>

Please help me in resolving this issue. 404 page needs to be effective at the root context also.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by akshitaa8272040

Sure Kautuk,

We basically used ACS Common for error handling.

I have used following sling:OsgiConfig to configure the Error Page Handler.

/apps/myapp/config/com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl.xml

     It has a property named error-page.system-path.

This property was not pointing to the error page that I have created under my project in siteadmin, because of which it was showing the blank page.

For reference, how to do error handling using ACS AEM Commons please go through below link:

https://adobe-consulting-services.github.io/acs-aem-commons/features/errorpagehandler.html

-Akshita

4 replies

akshitaa8272040AuthorAccepted solution
New Participant
May 27, 2016

Sure Kautuk,

We basically used ACS Common for error handling.

I have used following sling:OsgiConfig to configure the Error Page Handler.

/apps/myapp/config/com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl.xml

     It has a property named error-page.system-path.

This property was not pointing to the error page that I have created under my project in siteadmin, because of which it was showing the blank page.

For reference, how to do error handling using ACS AEM Commons please go through below link:

https://adobe-consulting-services.github.io/acs-aem-commons/features/errorpagehandler.html

-Akshita

kautuk_sahni
Employee
May 27, 2016

akshitaa82720401 wrote...

Thanks for the input Ashok. Problem have been resolved.  :)

 

Hi

Can you please share the solution for benefit of community ?

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
New Participant
May 27, 2016

Thanks for the input Ashok. Problem have been resolved.  :)

Ashokkumar_TA
New Participant
May 26, 2016

You can use the resource resolver[1] to check how these 2 paths are getting resolved. Sometimes you might have some alias or vanity url pointing to /hello

 [1] http://localhost:4502/system/console/jcrresolver