skip to Main Content

DefaultHttpClient call throws connection refused in the same tomcat with public ip – CentOS

centos 7, tomcat 8.5. a.war and rest.war are in the same tomcat. a.war use following code to call rest.war: import org.apache.http.impl.client.DefaultHttpClient; DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json"); StringEntity se = new StringEntity(json.toString()); se.setContentType("text/json"); se.setContentEncoding(new…

VIEW QUESTION
Back To Top
Search