error connection refused

前端 未结 5 915
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 01:37

I want to make an Http Connection to my own servlet. Here is my code:

try
{
    HttpClient client = new DefaultHttpClient();
    HttpPost httpMethod = new Ht         


        
5条回答
  •  余生分开走
    2020-11-30 02:24

    The better is that you put your PC LAN's IP , for example , in windows , run "ipconfig" in a cmd console , suppose that your IP is : 192.168.1.34 , then

    HttpPost httpMethod = 
       new HttpPost("http://192.168.1.34:8080/getHeader/HeaderServlet");
    

提交回复
热议问题