Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Custom 404 Page Not Displayed in Dispatcher

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 3

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 

View solution in original post

3 Replies

Avatar

Level 2

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?

Avatar

Correct answer by
Level 3

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