This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Applets and the fly likes problems naming a host parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "problems naming a host parameter" Watch "problems naming a host parameter" New topic

problems naming a host parameter

Krista Meek

Joined: Oct 24, 2005
Posts: 12
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: Connection refused: connect

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

applet error: access denied ( [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

Joined: Mar 22, 2005
Posts: 42954
An applet is only allowed to make network connections to the host where it came from. So if the applet is hosted at, and the chat server is at, 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.
rocket mass heater kickstarter
subject: problems naming a host parameter