• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Socket Applets(URGENT)

Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How Can I use Applet to open Sockets? (NOT APPLICATION)
Thanks in advance,
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Angela Jessi
Its not possible to get a socket through an applet on local machine with server machine
cuz of the security policy of JVM of Browser.
any how if u find some solution for that then plz write it.
thanx in advance

Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've explored this issue quite a bit, and, until browsers become more robust, I think the only solution is to have the have the applet make the initial connection to the server and then procede as normal. If you must have the server contact the applet, then you'll have to use the Sun Java PlugIn since it is somewhat more lenient when it comes to security and setting security properties (Java 2 fine-grained security, etc.). I suggest you look at this simple chat application. It uses sockets and creates no security issues because it's permissable for the Appet to create a socket connection back to the same server that the Applet loaded from.
http://homepages.unl.ac.uk/~wrightc/tyj/Comms.htm#ChatClient http://homepages.unl.ac.uk/~wrightc/tyj/Comms.htm#ChatServer
I hope this helps.
catch it before it slithers away! Oh wait, it's a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic