• 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

AccessControlException when opening URL connection in Applet

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have an Applet - I believe it is signed ( I used keytool and jarsigner to sign it)

The purpose of the Applet is to load Images from a remote server via http.

I am getting an AccessControlException when I try do do a URL.openConnection()

This code works fine if the URL that I'm opening up is on the same server as the web-server hosting my Applet. But if the URL I'm opening is on a different web server I get the exception.

Below is the snippet of code that fails and the java stack trace.

This applet is a modified sample Applet for viewing images from IBM Content Manager similar to the eClient Applet viewer. I only mention it so people doing searches in the future might find this thread. If you haven't heard of Content Manager that's ok - this is a straight up Java question.

Can someone familiar with Applet security lend a hand and help me figure out what I have to do?

If needed, I could change the client policy files so the people's JREs can view the images. I just need some direction on how to do it.

Thanks in advance!

Output in JRE Console:

 
reply
    Bookmark Topic Watch Topic
  • New Topic