Java Linux ServerSocket does not do much -


i running linux fedora 18 , want java code print hello linux in web browser type in http:// myhostname. have use code in windows , work find. in linux use port 80 got permission denied. use port 8080 no permission denied didn't work. using port 80 client dose accept , can send , receive information on machine seversocket not on different if connect ton network.last thing have made policy file allow port 80 work useless , still not sure set policy file in code. sorry if long question have been researching issue month not please don't tell me google it. guess main question why can't serversocket broadcast out of linux machine , how fix it?

thank

on linux, need root use system ports 0 1023. tomcat has ways of opening port 80 without leaving process running root, bit complicated discuss here. linux provides ways give permissions access these port, use port 8080.

if use port 8080, need redirect using router port 80, or have specify want connect port 8080. browser assumes port 80. e.g. http://yourhost:8080/

to connect server machine, firewalls have setup connect all. firewall designed stop traffic haven't explicitly allowed. means may need open firewall on server, , network router , put public ip address (not internal one) in hosts file of client.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -