Two Laptop Bag
The moose likes Beginning Java and the fly likes Java Policy File? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Policy File?" Watch "Java Policy File?" New topic

Java Policy File?

Veerabhadram Mantha

Joined: May 11, 2006
Posts: 6

I am using an applet in a jsp application. There is a save button in the applet, when i hit the save button, control should return back to the jsp application. However this is not happening.
Since i am using applet,it seems that it cannot use the system resources. so i need to set the policy file.i hope i am interpreting the problem correct.Can anyone please guide me the procedure to give the permission in the policy file.

Thanks in advance

Joe Ess

Joined: Oct 29, 2001
Posts: 9190

It depends on what you are trying to do.
If you are trying to save data locally on the client, you can set the policy file or digitally sign the applet. Both are problematic. Setting the policy file would have to be done manually on each client before the app is run. Not easy. A digital certificate cost money (See the Java tutorial: Applet Security Restrictions).
You can, however, upload your data to the server and use AppletContext to have the browser download the file for you (via the showDocument() method). This method can also change the page that is displayed, so you can return control back to your jsp app.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Java Policy File?
It's not a secret anymore!