Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

writing a file onto a client from a web application

 
Chetan Bengaluru
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know how to write a String into a file on a machine located on the network from a web application.Can anybody help me out please.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On Windows only Spyware and Virus programs are allowed to do this.

Seriously, if you want the user to hit a web page that somehow writes to their local drives, you'll bump into Windows security policies. We've done this kind of thing through Applets. Really don't know if you can do it with JavaScript.
 
Chetan Bengaluru
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stan James:
On Windows only Spyware and Virus programs are allowed to do this.

Seriously, if you want the user to hit a web page that somehow writes to their local drives, you'll bump into Windows security policies. We've done this kind of thing through Applets. Really don't know if you can do it with JavaScript.


Hi,

The scenario is as follows.
#1) After logging in the user edits/creates a profile.
#2) This info is then fed into a Stored procedure which returns a ref cursor.
#3)A resultset is obtained from the cursor and then i iterate through the resultset.The contents fetched should then be written onto the directory specified by the user in step 1.

Can you please suggest a way out for this.I have no clue as to how i get a handle to the user's machine even if I am equipped with his host information.I can write into the server at some location but i am lost when it comes to writing into a file on another machine on the same network.

Any help/directions is most welcome.
Thanks & Regards
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The standard method for this is to provide a link to the user, for example "Download Results" that points to a JSP/servlet that performs the query and returns the data to be saved.

The user then right-clicks on the link and selects "Save Target As..." to specify the location to which the data should be saved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic