• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

download any file from servlet..

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello java experts.
my problem is that all any file(zip,txt,exe) in reside in server. user wanna download thats file by webpage(jsp/servlet).
if download complete so server or servlet will know download complete.
or not trace it not completed.



how can it. please helo me.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go to http://simple.souther.us.
Download, deploy, and run SimpleStream.war

There is code in there that streams images from the WEB-INF directory to the client. That should get you started.

If you need to stream files that reside outside of your webapp, you may want to use a BufferedFileReader. The example uses a ServletOutputStream (which will work well if the app is being run from an unpacked war file).
reply
    Bookmark Topic Watch Topic
  • New Topic