• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Socket Permission in JavaPolicy file..

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

My real problem is:

In my applet, i am using servlet - applet communication to get the data from server. In the applet i am showing some data.

When I am using http, i don't have any problem working fine, when i am using proxy connection with https i am getting problem.

The error is
Exception:java.security.AccessControlException: access denied (java.net.SocketPermission proxy:80 connect,resolve)

if i am changing my policy file adding this permission, it works fine. But i don't want to change in the policy file, is there any option to add the permission in the java class file itself instead of changing the policy file.

need help.

Thanks in advance

Chidam GS
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The other way around this is to sign the applet. That is described here: HowCanAnAppletReadFilesOnTheLocalFileSystem
[ March 08, 2007: Message edited by: Ulf Dittmer ]
 
GS Chidam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Actually i don't want to create the sign applet, and also i don't want to manually change the policy file.

Is there any option to change the policy file using java code. Whenever the user open that applet page, i want to change policy using my code.

thanks in advance

regards
GS Chidam.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the applet code were able to change the local security settings, then the whole sandbox security would be worthless. It is impossible by design.

Those two methods are the only way to get around the problem you're facing.
 
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic