I was hoping to be able to return a binary response (file) via the AjaxOutput option of a LiveSite component, specifically by directly writing to the HttpServletResponse (headers and output stream). Unfortunately, this generates an error "getWriter() has already been called for this response" - likely due to how the doOutputAjax **method in **com.interwoven.livesite.runtime.rendering.RenderingManager opens the PrintWriter **prior to executing the **ExternalAjaxOutputGenerator. I did try the HttpServletResponse.reset() option, but it doesn't seem to fix the issue.
My questions are:
- has anyone done this in TeamSite/LiveSite before, and
- is there any easy/alternative way I should be doing this?
This is using TeamSite 7.4.1.3.0.