• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
Trust God, but always tether your camel... to this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic