Custom 404 Page Not Displayed in Dispatcher | Community
Skip to main content
formis17
Level 2
October 16, 2015
Solved

Custom 404 Page Not Displayed in Dispatcher

  • October 16, 2015
  • 3 replies
  • 1228 views

Hello,

I have been working on a customized 404 page for my company's website. I created a custom page component, and then created a page under each of the 9 languages supported by our website. For example, we have en/page-not-found.html and de/page-not-found.html, etc... In 404.jsp, I included a series of if statements that determine the language used by the user when the request was made. The appropriate page is then included. This error page renders properly on the publisher, but it does not display at all on the dispatcher. When the incorrect URL is entered in the dispatcher, a blank page is returned. However, the title is applied. 

I do not want to cache the 404 page on the dispatcher, because the requested URL is dynamically rendered on the page. Is there any way that I can configure the dispatcher to display the 404 page without caching it?

Thank you.

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 aem_visi

To me it seems like an implementation issue. It could be that the attribute which defines the users-language is not set when sending the request to the dispatcher. It is hard to tell exactly without looking at the code. Perhaps you could add a default message in your if statements which will be printed when none of the if statements returns true. You could also try to print the attribute where which specifies the user language. I would suspect that the default message will be shown on the dispatcher 

3 replies

Scott_Brodersen
Level 8
October 16, 2015

Hi,

create a rule that causes the page to always be rendered: http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Specifying%20the%20Documents%20to%20Cache

scott

formis17
formis17Author
Level 2
October 16, 2015

Scott Brodersen wrote...

Hi,

create a rule that causes the page to always be rendered: http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Specifying%20the%20Documents%20to%20Cache

scott

 

Thanks Scott, but we would like to do this without hitting publish directly, since that will decrease the performance. Do you have any other suggestions?

aem_visiAccepted solution
Level 3
October 16, 2015

To me it seems like an implementation issue. It could be that the attribute which defines the users-language is not set when sending the request to the dispatcher. It is hard to tell exactly without looking at the code. Perhaps you could add a default message in your if statements which will be printed when none of the if statements returns true. You could also try to print the attribute where which specifies the user language. I would suspect that the default message will be shown on the dispatcher