Meaningless Drivel is fun!*
The moose likes Applets and the fly likes How to download a text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "How to download a text file" Watch "How to download a text file" New topic
Author

How to download a text file

nisha Sham
Greenhorn

Joined: Jun 12, 2002
Posts: 19
I want to download a text file in my local web server to the
given location in PC. Please help

Thanks
Sham
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

For security reasions, regular applets are forbidden from accessing the local file system so you will have to provide a digital signiture for your applet. Downloading the file is as easy as creating an instance of java.net.URL and saving the content using the IO streams (IO tutorial here).


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to download a text file
 
Similar Threads
java.net.UnknownHostException
Nokia 3520 TDMA
Upload and download a file from oracle database
code for downloading file in spring 3.0
Selecting a particular row in <table> tag used.