In grails application for few controller/action, response.sendError(404) is rendering mapped page(404 page which is mapped in UrlMappings.groovy) correctly. but for some actions its showing empty page.
I tried to see the log, I found error like below : o.s.boot.web.support.ErrorPageFilter - Cannot forward to error page for request [/guitar/adfsalf] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false.
Can you please help me for finding root cause and better solution for this?.
Thanks,