Skip to main content
gamedev.net
🔒 Locked

[java] Java Applet Writing to Host

Started by Bimble Bob Sep 22, 2006 at 11:22 AM 4 replies 1k views
Original Post
Bimble Bob
Bimble Bob
Is it possible to have a Java applet to write to the host it came from? I want players to be able to save their progress in my game but I can't write to their local disc and I don't want to create a server application so is there another way?
It's not a bug... it's a feature!
CaptainJester
CaptainJester
You already have a server. The server that has the applet can be set up with a cgi page such as php/perl/asp that can be invoked by the applet. Pass in the appropriate info to the page and the page can save the data.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][
Bimble Bob
Bimble Bob
That's annoying since I'm rather useless in CGI and I dont know much PHP.
It's not a bug... it's a feature!
Son of Cain
Son of Cain
Your applet has limited priviledges even on the server that stores it (unless a policy file has been configured for it, with the proper permissions). Capn' suggestion is the one that saves you a lot of trouble, although requiring you to use another language for the job. I'd rather look for a Tomcat server, where you can both deploy your applet and use JSP to integrate with common classes to save your data somewhere.
a.k.a javabeats at yahoo.ca
CaptainJester
CaptainJester
Your other option is to digitally sign your applet. Then you will be able to save on your users hard drive.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][
Bimble Bob
Bimble Bob
Thank you for the replies.
It's not a bug... it's a feature!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.