Two Laptop Bag
The moose likes Beginning Java and the fly likes Applet rights ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Applet rights ..." Watch "Applet rights ..." New topic

Applet rights ...

Shah Chunky
Ranch Hand

Joined: Dec 27, 2000
Posts: 116
Subject: Applet rights ...
Hello all...
Can someone tell me whether an applet can store a database file into clients computer & later
access the same & perform any manipulation of that database file & maybe transfer the data
from Clients computer to applets originating server.

Shah Chunky - Sun Certified Java2 Programmer.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
I believe that they can after the user has granted permission. You must use either netscape or explorer packages to query the user about it using the correct method depending on which browser is being used.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Sounds like a cookie to me. A cookie is just a file containing data about the user and the machine that they are using etc.
That is how folks like can so miraculously know what sort of stuff that you like to buy, what you username is, when you were there last etc. If they tried to keep all that information for millions of users on THEIR server it would have to be HUGH, so they use OUR space instead .
I don't know of any limit to the amount of data that you can stuff into a cookie.
The browser has to have "cookies enabled" of course.
To get information back to the server you need to use Servlets , or RMI, or J2EE or Corba etc.
[This message has been edited by Cindy Glass (edited February 19, 2001).]

"JavaRanch, where the deer and the Certified play" - David O'Meara
Grant Crofton
Ranch Hand

Joined: Nov 08, 2000
Posts: 154
I looked into file access from applets a while ago, but I never totally found out how it works...
I think in some cases you can write/access certain files, but you have to go through loads of stuff like writing a file granting access and putting it in a certain directory on the user's machine, etc... Not simple, in any case.
If the applet is running from the user's machine (not off the Internet) you can access a file by opening it with a URL, so that could be an option.
I agree. Here's the link:
subject: Applet rights ...
jQuery in Action, 3rd edition