• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet-servlet communication

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,
I have my applet running in localmachine and servlet on a remote machine[lets call it http://host.xxx.com:8080

When I try to communicate these two I get this exception:
java.security.AccessControlException: access denied (java.net.SocketPermission host.xxx.com:8080 connect,resolve)

My servlet runs in tomcat.

What can I do to solve this ? I tried starting tomcat with securitymanager enabled[by giving -security], that didnt help.
What else can I try ?

Thanks,
Atul
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An applet can only connect to the host where it's served from, so if it is hosted on localhost, then it will not be able to connect to any other machine. The way around that is to either sign the applet, or fiddle with your local security policy. Both approaches are HowCanAnAppletReadFilesOnTheLocalFileSystem]described here[/url].
 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic