[6524] in java-interest

home help back first fref pref prev next nref lref last post

AppletSecurity Exception

daemon@ATHENA.MIT.EDU (Kenneth Cheng)
Wed Apr 3 11:43:57 1996

Date:         Tue, 2 Apr 1996 10:24:31 -0800
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: Kenneth Cheng <kcheng@CS.STANFORD.EDU>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>

I was trying to establish an URL connection.  When I run my code as a
standalone program, it works fine. However, when I run it as an applet,
I receive the following error message:

*** Security Exception: socket.connect:->www-leland.stanford.edu ***
sun.applet.AppletSecurityException: security.socket.connect: ->www-leland.stanfo
rd.edu
        at sun.applet.AppletSecurity.checkConnect(AppletSecurity.java:424)
        at sun.applet.AppletSecurity.checkConnect(AppletSecurity.java:363)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:103)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:412)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:68)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:159)
        at test.getInputData(test.java:41)
        at test.init(test.java:26)
        at sun.applet.AppletPanel.run(AppletPanel.java:243)
        at java.lang.Thread.run(Thread.java:289)
error in creating input stream.

What have I done wrong?

home help back first fref pref prev next nref lref last post