HttpPost Not working with long length parameters
===

I am trying to send some data to a `sevlet` using `HttpPost` in android.Here is my code.
         

    String url ="MyURL";
         DefaultHttpClient client = new DefaultHttpClient();
         String data="DataToSend";
         HttpPost post = new HttpPost(url);
         List<NameValuePair> pdata = new ArrayList<NameValuePair>(1);
         pdata.add(new BasicNameValuePair("param", data));
         post.setEntity(new UrlEncodedFormEntity(pdata));
         HttpResponse execute = client.execute(post);
         System.out.println(execute.getStatusLine().getStatusCode());

This works for data with small length.But when i give data String that length about 4000 then it halt and nothing happen and Servlet dose not receive a request.Can anyone show me what am i doing wrong here and what is the correct way.


