Forum Stats

  • 3,781,581 Users
  • 2,254,530 Discussions


Applet URLConnection with IE5.0

843811 Member Posts: 49,851
Hello =)
I'm new to java networking so hopefully you can help me.
I have a applet that is supposed to open a URLConnection to a server listening on the port. It works fine in appletviewer, but throws a security exception in IE 5.0
Any Ideas?
URL source = new URL("http://"+getCodeBase().getHost()
URLConnection pipe = source.openConnection();

the exception i get is:[Home.init]: cannot access "localhost":80


  • 843811
    843811 Member Posts: 49,851
    hi :-)

    type policytool in dos prompt. if you have any policy file already in default it will automatically open it. if you dont have no problem just click add policy entry button just dont enter anything in codebase and signed by just click add permission and select All permission and say ok and click done and save this file in your profile directory or in your C:\jdk1.3\jre\lib\security\ as .java.policy file.

    and then try this program hope so it wont give any error.

    feel free to contact me in [email protected] if u want further clarifications.
This discussion has been closed.