File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Applets and sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Applets and sockets" Watch "Applets and sockets" New topic
Author

Applets and sockets

Dan Lynch
Ranch Hand

Joined: May 16, 2003
Posts: 47
Hi All,

Ive been the forum for a solution to this problem but couldnt find one, I hope you can help.

I am trying to run a socket client within an applet. I got the applet connecting to the serversocket when the serversocket is run on the same machine as the applet. I read that to connect remotely to the applet and have the serversockets work the applet has to be run on the same machine as the socket is hosted from and that all applet clients will have to download the .policy file.

Is there any way around this? Basically I would like to host the applet from a seperate webserver and have it connect to the serversocket on a different machine and still allow people to run the applet remotely.

If I sign the applet will this allow me to achieve this?

Thanks for the help in advance
Dan
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
In theory you can use a signed applet for that.
In practice this is almost always more trouble than it's worth and the requirements are better served by not using an applet at all but a full blown application distributed through JavaWebStart (for example).


42
Dan Lynch
Ranch Hand

Joined: May 16, 2003
Posts: 47
Thanks for the suggestion,

I have never used Java Web Start. I gather that every client would need to access the application through Java Web Start, and thus need it on their machine?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Java WebStart is installed with the JRE so you don't need to specifically install is.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Applets and sockets