<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6944.0">
<TITLE>Setting Content Disposition and Content Type</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">All,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">We're creating a template that can stream binary content back to the browser. In order to do so, I need to set the content type and content disposition as follows:</FONT></P>
<P><FONT SIZE=2 FACE="Arial">response.setContentType("application/x-download");</FONT>
<BR><FONT SIZE=2 FACE="Arial">response.addHeader("Content-Disposition", "attachment; filename=test.zip");</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">In general, this approach would work, but it seems like OpenCMS is removing the headers from the response (or never adding them in the first place). Has anybody tried this before or anyone know what the problem could be?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Regards,</FONT>
</P>
<P><SPAN LANG="en-us"><B><I><FONT SIZE=2 FACE="Arial">Brett Beaumont</FONT></I></B></SPAN><B><I><SPAN LANG="en-nz"></SPAN></I><SPAN LANG="en-nz"><FONT SIZE=2 FACE="Arial"></FONT></SPAN></B><SPAN LANG="en-nz"> </SPAN>
<BR><SPAN LANG="en-us"><I><FONT SIZE=1 FACE="Arial">T</FONT><FONT SIZE=2 FACE="Arial">echnical Consultant </FONT></I></SPAN>
<BR><SPAN LANG="en-us"><I><FONT SIZE=2 FACE="Arial">Sytec Resources Limited</FONT></I></SPAN><I><SPAN LANG="en-nz"><FONT SIZE=2 FACE="Arial"></FONT></SPAN></I><I><SPAN LANG="en-nz"><B></B></SPAN></I><SPAN LANG="en-nz"><B></B><B> </B></SPAN>
</P>
<P><SPAN LANG="en-nz"><I><FONT SIZE=1 FACE="Arial">Phone</FONT></I> <FONT SIZE=1 FACE="Arial">+64 4 473 5805<BR>
</FONT><I><FONT SIZE=1 FACE="Arial">Fax</FONT></I><FONT SIZE=1 FACE="Arial"> +64 4 473 5812</FONT></SPAN>
<BR><SPAN LANG="en-nz"><I><FONT SIZE=1 FACE="Arial">Email</FONT></I><FONT SIZE=1 FACE="Arial"> <U> </U></FONT><U><FONT COLOR="#0000FF" SIZE=1 FACE="Arial"><<A HREF="mailto:brett.beaumont@sytec.com">mailto:brett.beaumont@sytec.com</A>></FONT></U></SPAN>
<BR><SPAN LANG="en-nz"><I><FONT SIZE=1 FACE="Arial">WWW</FONT></I><FONT SIZE=1 FACE="Arial"> <A HREF="http://www.sytec.com">http://www.sytec.com</A></FONT></SPAN>
</P>
<P><SPAN LANG="en-nz"><FONT SIZE=1 FACE="Arial">Important: This electronic mail message and attachments (if any) are confidential and may be legally privileged. If you are not the intended recipient please contact us immediately and destroy this message. You may not legally copy, disclose, disseminate or use the contents in any way. Thank you.</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><I></I></B></SPAN><SPAN LANG="en-us"><B><I></I></B></SPAN></P>
</BODY>
</HTML>