standard 404 behaviour | Community
Skip to main content
New Participant
October 16, 2015
Solved

standard 404 behaviour

  • October 16, 2015
  • 1 reply
  • 813 views

Hi,

I've one component in my project, which should send the http status code 404 in some cases. If the component sends this errorcode, the default 404 error page should be displayed.

To test this behaviour I added "<% response.sendError(404); %>" to /libs/foundation/components/text/text.jsp. After that I requested the page http://localhost:4503/content/geometrixx/en/products/triangle.html. In firebug I can see the status 404, but the default errorpage and the content of http://localhost:4503/content/geometrixx/en/products/triangle.html are shown in the browser (see attached sceenshot).

Has anybody an idea how to show the default errorpage only?

 

regards

Reinhard

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 BrianKasingli

When the backend code in AEM executes response.sendError(404), the Dispatcher receives the error response and handles it based on its configuration. It typically propagates the error back to the client, following the rules defined in the dispatcher.any configuration file. The specific behavior may vary depending on your setup and customization. 

1 reply

BrianKasingli
BrianKasingliAccepted solution
New Participant
July 17, 2023

When the backend code in AEM executes response.sendError(404), the Dispatcher receives the error response and handles it based on its configuration. It typically propagates the error back to the client, following the rules defined in the dispatcher.any configuration file. The specific behavior may vary depending on your setup and customization.