Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 43327 invoked from network); 3 Apr 2006 02:59:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Apr 2006 02:59:50 -0000 Received: (qmail 33530 invoked by uid 500); 3 Apr 2006 02:59:38 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 33504 invoked by uid 500); 3 Apr 2006 02:59:38 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 33493 invoked by uid 99); 3 Apr 2006 02:59:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Apr 2006 19:59:38 -0700 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (asf.osuosl.org: transitioning domain of mike.sabroff@cygnusb2b.com does not designate 68.142.229.102 as permitted sender) Received: from [68.142.229.102] (HELO smtp103.sbc.mail.re2.yahoo.com) (68.142.229.102) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 02 Apr 2006 19:59:37 -0700 Received: (qmail 10602 invoked from network); 3 Apr 2006 02:59:16 -0000 Received: from unknown (HELO ?192.168.123.128?) (msabroff@sbcglobal.net@70.226.130.18 with plain) by smtp103.sbc.mail.re2.yahoo.com with SMTP; 3 Apr 2006 02:59:16 -0000 Message-ID: <44309030.5050007@cygnusb2b.com> Date: Sun, 02 Apr 2006 22:02:08 -0500 From: Mike Sabroff User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: What is the best way to send back a file as http response? References: <20060402230103.64268.qmail@web51608.mail.yahoo.com> In-Reply-To: <20060402230103.64268.qmail@web51608.mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N You can Kanishka Liyanage wrote: > Why cannot you forward your response to the file URL > if the file is available within the web application > directory. > > response.sendRedirect("File Location"); > > Otherwise you can use the servlet output stream > > Good Luck > -Kanishka > > > --- Meryl Silverburgh > wrote: > > >> Hi all, >> >> Can you please tell me what is the best way to send >> back a file as >> http response in a Servlet? >> Should I use NIO? >> Or I just use the normal, open the file, read it a >> chuck at a time and >> write that to the servlet output stream? >> >> Thank you. >> >> >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: >> users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: >> users-help@tomcat.apache.org >> >> >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > -- Mike Sabroff Web Services Developer mike.sabroff@cygnusb2b.com 920-568-8379 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org