The file is extracted from a database and does not exist on the server's filesystem yet; redirecting to a servlet to create and send the response which contains the file to download fails with a generic:
java.lang.IllegalStateException: Can't invoke sendRedirect() after certain methods have been called
More specifically, that method can not be invoked after any of the following methods of the ActionResponse interface has been called:
- setPortletMode
- setWindowState
- setRenderParameter
- setRenderParameters
- removePublicRenderParamter