I'm not sure, but I assume that you did not set any rendering option when redirecting to the error page.
Try this and see if it helps anyway (you can place it instead of the line with the dispatcher):
response.setRenderParameter("jspPage", "/WEB-INF/views/html/jsp/error.jsp");
I use such redirects with actionResponse , but it should work with resourceResponse as well ...
EDIT: The resource response does not contain the setRenderParameter method, but zou may try to use the following approach:
create renderURL using response.createRenderURL() . If a request is launched using this URL, this will result in a request / response to the visa (or a request for an action that can access this method).
The problem is that you are trying to redirect to another page during the portlet resource phase (the rendering phase is not called during this phase).
source share