Forums Register Login

Getting permissions to open a socket

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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).]
+Pie Number of slices to send: Send
Just add-on. Applet can open a connection only to the host this applet was downloaded from.
+Pie Number of slices to send: Send
Yes, I mentioned that in my answer. If you need to go to another server you will need a certificate.
+Pie Number of slices to send: Send
Oops, my fault :O
I don't always make ads but when I do they're tiny
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1196 times.
Similar Threads
How to create a chat server for my hostel
java.net.ConnectException: Connection refused
Socket Applets
I want observer/observable implemented in Servlet/Applet
Can I Have Two-Way Communication with Sockets with just one Port?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:32:48.