0

I'm performing login on server using HttpPost method.

CommonsConnection.initHttpConnection();
HttpResponse response;
String contentOfMyInputStream;

HttpGet initPostMethod = new HttpGet("https://stat.volia.com:8443/ktvinet/index.jsp");
response = CommonsConnection.hc.execute(initPostMethod);

HttpPost Statistics = new HttpPost("https://stat.volia.com:8443/ktvinet/j_security_check");
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(3);

nameValuePairs.add(new BasicNameValuePair("j_username", "username"));
nameValuePairs.add(new BasicNameValuePair("j_password", "password"));
nameValuePairs.add(new BasicNameValuePair("submit", "%C2%EE%E9%F2%E8"));

Statistics.setEntity(new UrlEncodedFormEntity(nameValuePairs));
response = CommonsConnection.hc.execute(Statistics);

HttpGet mainPage = new HttpGet("https://stat.volia.com:8443/ktvinet/main.do");
response = CommonsConnection.hc.execute(mainPage);

contentOfMyInputStream = EntityUtils.toString(response.getEntity());

The response I get - body of webpage - is like 1/5 part of webpage, which ends with "...". Am I missing some parameter for httpclient ?

saikek
  • 1,099
  • 1
  • 8
  • 15

2 Answers2

0

How are you examining the response? if you're looking int he debugger or something similar, it may well truncate long strings, try dumping it in a file.

superfell
  • 18,780
  • 4
  • 59
  • 81
0

Logcat displays only part of long string response.

Zoombie
  • 3,590
  • 5
  • 33
  • 40