Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

return a text file from webapp

 
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
Pie
Posts: 9259
10
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic