• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Write file to remote Server using Applet

 
Milind Deodhar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i know that this is not a straight forward thing, but do you know any way by which writing a file to server from the applet can be achieved.
Thanks
Milind.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi milind
from top of my mind stack i can think of these,
1. use FTP client written in Java if the server supports the ftp socket connection and transfer the file
2. use simple OutputStream and write Bytes of the file to the server. of course u have to make URLConnection to one of the servlets on the serverside (from where the applet came) and then communicate...may b u can refer to Orielly's books about Servlets and read 11th chapter about applet/servelt communication for this
3. use RMI. write a RMI server that can accept the file bytes (very similar to the one above). i'm not a RMI expert (probably not even beginner)
4. write a Server process in Java and use client/server communication by ServerSocket and Socket classes and use the output stream...
5. use HTTP file upload by passing the full path of the file on client side to the javascript (using LiveConnect) and then having a form that gets autosubmitted for the multipart requests...
all of the above ideas will pose many requirements /constraints but thats what i could thought of and now u can eliminiate difficult options for u and chose one that is easiest for u...

regards
maulin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic