This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes download any file from servlet.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "download any file from servlet.." Watch "download any file from servlet.." New topic
Author

download any file from servlet..

harry sisodia
Greenhorn

Joined: Feb 10, 2005
Posts: 5
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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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).


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
jQuery in Action, 2nd edition
 
subject: download any file from servlet..
 
Similar Threads
download file from tomcat server
how to download file from server through servlet
Java code to Download a file from Server
measure download speed of internet
down load file from server