Re: how to download a file using servlets



On Thu, 15 Nov 2007 20:45:22 -0800 (PST), vphanibhushanreddy@xxxxxxxxx
wrote, quoted or indirectly quoted someone who said :

Could any body send me the sample code for downloading a file using
servlets? I had this problem, when i tried to download the res was not
happening as stream, how can i make that please send me sample code?

use a sniffer to have a look at the messages to and from the server to
request a download. If the file is short, you can return it as your
response. If it long, you might need to spawn a separate thread, or
use some feature of Servlets I am not familiar with to handle the long
download.

see http://mindprod.com/jgloss/sniffer.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Re: Servlets: Getting Started
    ... Where can I get a hold of the J2EE 1.4 SDK for free? ... Everytime I try to download it from Sun, ... I passed SCWCD by reading up on the Servlet and JSP Specs, ... you might want to buy 'Head First Servlets and JSP' which ...
    (comp.lang.java.programmer)
  • Re: Servlets: Getting Started
    ... Where can I get a hold of the J2EE 1.4 SDK for free? ... This Catalog lists only the for sale products on the Download ... you might want to buy 'Head First Servlets and JSP' which ...
    (comp.lang.java.programmer)
  • Re: newbie servlet question
    ... You need the J2EE (enterprise edition) ... to do servlets and JSP's. ... if you have problems at the download page ...
    (comp.lang.java.programmer)
  • how to download webserver !!
    ... I am interested in downloading a webserver and try some jsp, servlets ... I went to Apache download instructions .. ...
    (comp.programming)
  • Re: Assembly conversion to Pocket Pc format
    ... But in my case it is throwing exception before executing that statement what ... That is before reading buffer size it is throwing ... Stream respStream = resp.GetResponseStream; ... upload and download files in compact framework. ...
    (microsoft.public.dotnet.framework.compactframework)