[5059] in java-interest
Sockets in Netscape
daemon@ATHENA.MIT.EDU (Cay Horstmann)
Sun Jan 28 01:08:41 1996
From: Cay Horstmann <horstman@jupiter.SJSU.EDU>
To: "'Gary Cornell'" <75720.1524@compuserve.com>,
"'java-interest@java.sun.com'" <java-interest@java.sun.com>
Date: Sat, 27 Jan 1996 06:20:05 -0800
I am trying to write an applet that gets some information from a Gopher
site.
I can't seem to get a URL "gopher://..." to work--unknown protocol
"gopher". Oh, well, so they broke that. But the resourceful programmer just
hacks it by hand.
Socket s = new Socket("...", 70);
I can get the entire applet to work find when I run it from appletviewer.
It connects to the socket, tells the remote gopher the name of the desired
file and downloads it. So I put it the applet my Web page. When using
Netscape Beta 3, it works great. With Beta 5 and 6a, and reading the script
locally, it works great. But when reading the script off the Web page on my
home page server, it simply hangs when trying to open the socket. Not even
an exception throw...
Is this a Netscape bug or yet another !@#$ security feature?
I recall that there was a discussion some time ago that there was some
restriction in opening sockets in an applet, but (a) it was muddled at the
time and (b) it seems to have changed with newer Netscape betas. Can anyone
explain what, if any, restrictions there are this week?
In my setup, there are three machines involved.
(A) the user's machine (in this case my home laptop) loading my Web
page
(B) the machine serving my Web page and Java script
(C) the machine hosting the remote gopher site
I'd like to establish a connection between (C) and (A). Why does it seem to
make a difference if the Java script resides on (B) rather than (A)? And
anyway, what could be so insecure about that? When browsing the net, you do
that all the time.
Cay
horstman@cs.sjsu.edu
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com