Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

return a text file from webapp  RSS feed

 
Natalia Lopez
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again
I can't find solution to my problem. I need to save in the user local disk a txt file with some text inside, when the user press a button on a webapplication page.
Anybody can say me how to do this or where to find code examples.
Regards

Naty
 
Joe Ess
Bartender
Posts: 9400
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the problem with what we talked about in your previous post?
 
Natalia Lopez
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't find the way to create and return the txt file (to save to disk) to the user that press a button on the web application.
I need to do two things when user press ok, show a result on screen and give the oprtunity to save that results on a txt file into the disk

Naty
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To write to the disk, just use FileWriter or BufferedWriter.
To read from disk, just use FileReader or BufferedReader.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!