my dog learned polymorphism*
The moose likes Applets 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Java Policy file" Watch "Java Policy file" New topic
Author

Java Policy file

Veerabhadram Mantha
Greenhorn

Joined: May 11, 2006
Posts: 6
Hi,

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

Regards,
Veerabhadram
hassan ali
Ranch Hand

Joined: Apr 23, 2006
Posts: 127
you need to sign your jar file

in steps
i got it from javaCook book

Recipe 23.14 Signing Your JAR File

1-Create a new key in a new "keystore" as follows:
keytool -genkey -keystore myKeystore -alias myself

The program prompts you in the terminal window for information about the new key


2-Create a self-signed test certificate:
keytool -selfcert -alias myself -keystore myKeystore

You enter the keystore password and keytool generates the certificate.




3-You can now sign the JAR file with your test certificate:


jarsigner -keystore myKeystore test.jar myself
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
What do you mean by "control should return back to the jsp application"? Does the applet submit an HTTP request, and afterwards you want to redirect to a certain JSP page? If so, you can do that using getAppletContext().showDocument(String).


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java Policy file
 
Similar Threads
Java Policy File?
Need Help for RMI
How to show image in jsp from any where using browse button?
Save as Dialog in Applet
Saving image at runtime