The site node importing this component has "application/vnd.ms-excel" set as its content type.
This partially works: The excel file is sent correctly and can be saved/opened. But the filename always is "ViewPage.action" and the mimetype is not set correctly so all browsers don't recognize the file as excel.
Everything works fine if I generate CSV files instead of excel files (and set the site node's content type to "text/csv" respectively).
Is is possible to send binary content from within a component?
How can I successfully set the filename and mime type?
Obviously you should use another encoding if you don't want to use ISO I think that Infoglue might be overriding your response.setXX calls, and by using IG tags instead it should work better.
Thanks, this works fine as long as I write text into the component.
If I write content to the output stream like this
<%
...
response.getOutputStream().write(excelFileBytes);
...
%>
the filename and content-type settings done by the page-taglib directives are broken.
We solved the problem by putting a jsp page into the infoglueDeliver*/jsp/ directory and redirecting to this page with parameters put into the session scope
(so we preserved the security needs).