• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to download a text file

 
nisha Sham
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic