Results 1 to 2 of 2
  1. #1
    aghilkrishna is offline Member
    Join Date
    Aug 2012
    Rep Power

    Question How to decrease the HttpClient url connectivity time to a server ?


    I'm validating some api urls provided from a web service. I'm calling those urls for more than 4000 time with different parameters through HttpClient class. When i start my java program, it will takes 3 to 4 hours to complete the process. I need to reduce this time consumption.

    Is there any way to reduce the time consumption or increase the url request connectivity speed ?

    And also could you please explain me the root cause for this problem and how to solve this problem ?

    sample code:

    PostMethod post = new PostMethod(targetURL);

    HttpClient httpclient = new HttpClient();

    MultiThreadedHttpConnectionManager cnmngr = new MultiThreadedHttpConnectionManager();

    httpclient.getParams().setParameter("http.protocol .content-charset", "UTF-8");
    int result = httpclient.executeMethod(post);
    String postResp = post.getResponseBodyAsString();

    Thanks in advance.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: How to decrease the HttpClient url connectivity time to a server ?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 0
    Last Post: 03-18-2011, 08:48 PM
  2. connectivity with SQL server in Jdeveloper usin struts nd jsp
    By gurpreet.singh in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-17-2011, 11:26 AM
  3. Facing problem in connectivity to MySql Server
    By sunny23m in forum Advanced Java
    Replies: 3
    Last Post: 09-18-2010, 07:06 PM
  4. Database connectivity error with Websphere server
    By praveen_1987 in forum Enterprise JavaBeans (EJB)
    Replies: 3
    Last Post: 05-21-2010, 08:33 AM
  5. gridbaglayout: increase/decrease size of components.
    By newtojava7 in forum New To Java
    Replies: 2
    Last Post: 01-28-2008, 07:22 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts