Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Saving data from applet how?

 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have created an applet that crops an image for the user. Now I would like to save the x,y coordinates to a file, database or input type text. How can I do this without signing the applet and using sockets. I do not want all users to open the port for the socket.

Can I save the coordinates to a file on the server where the applet originates from?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the server have a servlet container? In that case I would write a small servlet that reads the values from URL parameters, and saves them to a file. The java.net.URL and URLConnection classes are helpful for this.
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't thinks so. We use Apache on MacOs x.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Apache on OS X comes with WebDAV. You should be able to find Java client code to use that as part of the applet.

But you mentioned a DB as a possibility as well - if that's running on the same machine where the web server runs, the applet can access it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic