Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to Modify Policy file to grant access ??

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have an applet which is hosted on a server in my local intranet.
I want to give this applet full persmission on my machine.
I know i can have this as a trusted applet or have a Certificate installed.
Instead i would like to know, can i modify the java.policy file in my 'C:\Program Files\JavaSoft\JRE\1.4\lib\security' directory to achieve this. For instance if i edit my Policy file to make the following changes:
grant codeBase {
permission java.security.AllPermission;
};
In this case all applets will have full persmisson on my machine (which i dont want).
Instead i want just one applet running at one address (eg: http://software.myserver.com/SendMsg/SendMsg.jsp) to be given full permission. How do i change the 'grant codebase' statement to accomodate this.
Please help me out.
Thanks & Regards,
Sajee
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
You can modify the policy file in c:\javasoft\lib\security\policyfile,well you can give rights to your applet ,by using policytool and in this policy tool you can give rights to applet as socket permission ,java.net.socket permission and java.net.netPermission so you make a sign applet and modify java policy file and you applet would work,Please do ak futher questions.
You can see the following links for refernces.
http://www.ryerson.ca/~dgrimsha/courses/cps530/securityIntor2.html
http://java.sun.com/products/jdk/1.2/docs/tooldocs/win32/policytool.html#Introduction
Please do see the above links.

Thanks
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I forget to tell you this policytool is in jdk1.3\bin\ folder so you can easily use this utility to modify ur polcy file .
Thanks
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put the following grant entry
grant codeBase "http://software.myserver.com/SendMsg/SendMsg.jsp"; {
permission java.security.AllPermission;
};
 
Maybe he went home and went to bed. And took this tiny ad with him:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic