Expand my Community achievements bar.

SOLVED

standard 404 behaviour

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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. 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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.