• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems naming a host parameter

 
Krista Meek
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect to a chat server application that I have on my local machine, but when I run the applet I get the following error:

applet error: java.net.ConnectException: Connection refused: connect

I changed the parameter name several times and get some different errors such as:

applet error: java.security.AccessControlException: access denied (java.net.SocketPermission [C:\......(path to server)] resolve)

I assume it has to do with the host parameter in my applet. I am wondering how to name the host. Any suggestions would be appreciated.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet is only allowed to make network connections to the host where it came from. So if the applet is hosted at www.xyz.com, and the chat server is at www.xxyyzz.com, the connection is not permitted. That's one of the consequences of applets living in a "sandbox" inside the browser. Have a look at the Applet FAQ for ways to get around those restrictions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic