hi all,i wans to write on a text file which is kept at remote server and then i wans to read the content of that text file using applet.Plz sujjest me .Thanks in advance
[190 byte] By [jamesgoslina] at [2007-11-27 8:28:07]
since the applet is executed on client machine I think you will need sockets.server-appletclient solution should do the job.. i dont know of other alternatives.
If the file is available on a web server on the same host as the applet, then you can just use java.net.URL to open an HTTP connection (you use url.connect() and get a HttpURLConnection). Pretty easy.
Then open a URL and POST to it. (Or PUT if the server is so configured.)You'll need some server-side functionality to know how to deal with a POST or PUT -- but that would be the case if you were opening raw sockets, as well.