Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Custom 404 Page Not Displayed in Dispatcher

formis17
Level 2
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
aem_visi
Correct answer by
Level 3
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
formis17
Level 2
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?

aem_visi
Correct answer by
Level 3
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