• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Saving data from applet how?

 
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?
 
Rancher
Posts: 43016
76
  • 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: 43016
76
  • 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.
 
get schwifty. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic