Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Write file to remote Server using Applet

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
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...

We're being followed by intergalactic spies! Quick! Take this tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic