• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting permissions to open a socket

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I would like to improve my applet so that it accesses a Server program via a client/server system.
I am thinking I should just write my own Server program and just open a socket to it on some port. I have two questions, however:
1) How do I set the proper permissions on my Host machine so the applet can connect to the Server program from elswhere on the Internet?
2) What would be the pro's and con's of using a Applet/Servet combo to do this? Or does Applet/Servlet not work like Client/Server?
Thanks,
Erick
PS - This board has been far more helpful to mee than any boards on the Sun site! Thanks much for everyone's previous help.
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No permissions are required. All you need is a ServerSocket listening on some port. The only requirement is that the Applet must be connecting back to the server it came from. The browser's security mechanism will not allow the applet to connect to any other server unless it has a security certificate AND the user gives permission.
I personally prefer the applet/servlet combo. The only difficulty is in maintaining state on the server side but you can do that through the data you pass back to the server. Also, with the applet/servlet comination there is no browser security limitation on connecting to a different server than the applet came from.
[This message has been edited by Tom P (edited May 06, 2000).]
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just add-on. Applet can open a connection only to the host this applet was downloaded from.
 
Tom P
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I mentioned that in my answer. If you need to go to another server you will need a certificate.
 
Pawel Veselov
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops, my fault :O
 
reply
    Bookmark Topic Watch Topic
  • New Topic