Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applet FileOutStream to server

Status
Not open for further replies.

Toyman

Programmer
Jun 19, 2001
68
GB
Hi

How do you make 'n Applet write to the server where the applet html file is located. e.g on the webserver and not to the users machine ?

I got it working writing a file to the users machine but I want the file to be written to the server ....

Thanks
Toyman
 
So you want an Applet executing in a browser on a users machine to write a file to the Servers Disk? That of course can not happen directly since applications cannot write to disks on remote machines directly. They must cooperate in some way with an application on the remote machine to write the file for them.

So a simple solution is to have a Servlet or JSP resource on the server that will use HTTP POST data to write the file upon request. Then the Applet simply performs a POST request to the server using the standard URLConnection class.


-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top