From tomcat-user-return-94001-apmail-jakarta-tomcat-user-archive=jakarta.apache.org@jakarta.apache.org Mon Mar 01 16:56:17 2004 Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 56439 invoked from network); 1 Mar 2004 16:56:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Mar 2004 16:56:17 -0000 Received: (qmail 84001 invoked by uid 500); 1 Mar 2004 16:54:44 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 83979 invoked by uid 500); 1 Mar 2004 16:54:44 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 83947 invoked from network); 1 Mar 2004 16:54:43 -0000 Received: from unknown (HELO mwinf0103.wanadoo.fr) (193.252.22.30) by daedalus.apache.org with SMTP; 1 Mar 2004 16:54:43 -0000 Received: from marseille (ATuileries-110-2-1-72.w217-128.abo.wanadoo.fr [217.128.188.72]) by mwinf0103.wanadoo.fr (SMTP Server) with SMTP id CA8271BF94F5 for ; Mon, 1 Mar 2004 17:54:45 +0100 (CET) Message-ID: <003101c3ffaf$06178430$0800a8c0@marseille> Reply-To: "Tarik El Berrak" From: "Tarik El Berrak" To: "Tomcat Users List" References: <9C5166762F311146951505C6790A9CF8013DFE0F@US-VS1.corp.mpi.com> Subject: Re: serving binary files Date: Mon, 1 Mar 2004 18:02:47 +0100 Organization: Travelsoft MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hi excuse me, can you tell me can i unsubscribe from this mailig list thanks a lot ----- Original Message ----- From: "Shapira, Yoav" To: "Tomcat Users List" Sent: Monday, March 01, 2004 5:43 PM Subject: RE: serving binary files Howdy, >Does anyone have a suggestion on how to server binary files through tomcat? >I am creating a binary file as a result of a request and would like to let >the user download it. Just setting mime type and passing through as an >attachment doesn't work as write methods of the writer seem to truncate >upper bits of the data. This is not specific to tomcat, it's basic servlet writing. If you're outputting binary data, don't use the writer obtained from HttpServletResponse#getWriter. Instead, use the output stream obtained from HttpServletResponse#getOutputStream. Then setting the mime type will be sufficient. >Any useful suggestion would be greatly appreciated. And useless suggestions? ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org