• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

socket to applet inside a browser ?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can an applet(from within the browser) communicate to a socket on local machine?
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet can only communicate with sockets on the machine it was served from, unless it is signed and the user has agreed to let it do it.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did that and I was able to get an appletinside the browser to write a file to my hard disk but, following the same procedure of digitalsigning for opening network connections error isn't working as of now..will keep informed if things change ..but i read somewhere that sometimes browser is not smart enough to interpret "localhost"...ie.can't understand that the .class file has been loaded from the same machine..if you can elaborate..more cause basically i am trying to get an applet work for a chat program..
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the best way to do this is through applet/servlet communication. That way you don't need any certificates, you don't have to worry about moving the chat server to a different machine than the web server, etc.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the applet/servlet combination work a bit slow?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works at internet speed. I haven't had any trouble using the combination.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic