java - can't make http request on port other than 80 -



java - can't make http request on port other than 80 -

my java programme hitting "http://url:port" kind of url fetch data. on local windows machine deployed on tomcat 6, working fine. on production linux machine having tomcat 6 on it, gives me connection timeout.

ironically, if nail url without port number, bring me output not port. not finding clue, please help.

the snippet of code using connect , fetch info is:

httpclient httpclient = new defaulthttpclient(); httpget httpget = new httpget("59.162.167.36:80/api/…"); httpget.setheader("user-agent", "useragent: mozilla/5.0"); httpresponse response = httpclient.execute(httpget); httpentity entity = response.getentity();

one obvious possibility firewall in front end of production machine blocking access port. check firewall.

java http url port

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -