• 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

Newbie Question

 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I've been try to write a simple Applet / Servlet combo that can communicate with each other and I've hit a problem. When, from the Applet, I open a URLConnection to the Servlet running on tomcat, all seems to go well. However, when I go the further step to try to get an inputstream from the connection, I get the following error:
java.security.AccessControlException:
access denied(java.net.SocketPermission localhost resolve)
I'm wondering what is really going on here. Is the problem that I'm viewing the Applet page as a localhost? Do I need to change the configuration of tomcat?
Any help or advice would really be appreciated.
 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is that Java SandBx does not allow a simple applet to communicate for such security issues...there are two workaround:-
1. Make your applet signed one...the other problem here would be signing separately for Netscape and IE...can get some info on net for same...I had some link will post ASAP
2. Perhaps other way is to make another class in applet as standalone app and than communicate through this to Servlet...
Hope this may help...all the best

regards,
arun
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic