OBJECTIVE: I want to redirect visitors to a custom 500 error page in my content structure: /content/site/500
For testing purposes I created a JSP that calls the following code:
I have created the following files:
Both of these in fact include
In this 500.jsp - for simplicity - I have the following code:
But the redirect never happens. This was working fine in 5.5, but is no longer working in CQ 5.6.
Any help greatly appreciated!
Can you try below?
#1 - Check the error log for any exception
#2 - just put empty "return;" statement in your jsp after redirect statement because response.sendRedirect(); never transfter contol immediately and process the request instead it process the complete scrippt and then passes the control (process the request). So it may be possible that after your statement of response.sendRedirect(); there is something in your scriptlet which is blocking the control to pass and execute the request.
Let us know the update.
Our problem was a code error in the jsp, nothing special.