Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 30004 invoked from network); 22 May 2003 04:30:28 -0000 Received: from unknown (HELO bigcow.intraephox.ephox.com) (202.138.204.102) by daedalus.apache.org with SMTP; 22 May 2003 04:30:28 -0000 Received: by bigcow.intraephox.ephox.com with Internet Mail Service (5.5.2653.19) id ; Thu, 22 May 2003 14:30:24 +1000 Message-ID: <8D585857D762F741A47C1E1597FEAD3003B609@bigcow.intraephox.ephox.com> From: Adrian Sutton To: 'Jakarta Commons Users List' Subject: [httpclient] RE: HttpClient no response Date: Thu, 22 May 2003 14:30:24 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Eric, You'll need to provide some extra information before I can help you. I'd suggest you read through the appropriate sections of the user manual at http://jakarta.apache.org/commons/httpclient and in particular the tutorial (http://jakarta.apache.org/commons/httpclient/tutorial.html) and the trouble shooting guide (http://jakarta.apache.org/commons/httpclient/troubleshooting.html). If after that you still have problems, please provide the information gleaned from the trouble shooting guide in a post to the list (also prefix the subject with [httpclient] so people's filters pick it up). The wire trace log is particularly useful and instructions can be found at http://jakarta.apache.org/commons/httpclient/logging.html in almost any problem with HttpClient the log is required before we can help at all. In your case, since you have provided partial code, it would be useful to include the output since it's obviously not possible for us to run the code itself (because it's incomplete), including this output in the log file would be best. Regards, Adrian Sutton, Software Engineer Ephox Corporation www.ephox.com -----Original Message----- From: Eric Chow [mailto:echow@macaucabletv.com] Sent: Thursday, 22 May 2003 2:21 PM To: commons-user@jakarta.apache.org Subject: HttpClient no response Hello, When I tried to post some data to a web site, it always return no response just "null". But if I use the same URL in browser, it showed some content in the browser. Eric ------------------------------------ NameValuePair nv[] = new NameValuePair[35]; nv[0] = new NameValuePair("wv_booking_date", d); nv[1] = new NameValuePair("wv_booking_place", "PAV"); nv[2] = new NameValuePair("wv_booking_time_from", "14"); nv[3] = new NameValuePair("wv_booking_time_to", "15"); nv[4] = new NameValuePair("wv_booking_light", "Y"); //nv[5] = new NameValuePair("chk_booking_light", "on"); nv[5] = new NameValuePair("wv_booking_air", "N"); //nv[7] = new NameValuePair("chk_booking_air", "on"); nv[6] = new NameValuePair("wv_booking_facilities", "xxx"); nv[7] = new NameValuePair("wv_booking_date", ""); nv[8] = new NameValuePair("wv_booking_place", ""); nv[9] = new NameValuePair("wv_booking_time_from", ""); nv[10] = new NameValuePair("wv_booking_time_to", ""); nv[11] = new NameValuePair("wv_booking_light", ""); nv[12] = new NameValuePair("wv_booking_air", ""); nv[13] = new NameValuePair("wv_booking_facilities", ""); nv[14] = new NameValuePair("wv_booking_date", ""); nv[15] = new NameValuePair("wv_booking_place", ""); nv[16] = new NameValuePair("wv_booking_time_from", ""); nv[17] = new NameValuePair("wv_booking_time_to", ""); nv[18] = new NameValuePair("wv_booking_light", ""); nv[19] = new NameValuePair("wv_booking_air", ""); nv[20] = new NameValuePair("wv_booking_facilities", ""); nv[21] = new NameValuePair("wv_booking_date", ""); nv[22] = new NameValuePair("wv_booking_place", ""); nv[23] = new NameValuePair("wv_booking_time_from", ""); nv[24] = new NameValuePair("wv_booking_time_to", ""); nv[25] = new NameValuePair("wv_booking_light", ""); nv[26] = new NameValuePair("wv_booking_air", ""); nv[27] = new NameValuePair("wv_booking_facilities", ""); nv[28] = new NameValuePair("wv_booking_date", ""); nv[29] = new NameValuePair("wv_booking_place", ""); nv[30] = new NameValuePair("wv_booking_time_from", ""); nv[31] = new NameValuePair("wv_booking_time_to", ""); nv[32] = new NameValuePair("wv_booking_light", ""); nv[33] = new NameValuePair("wv_booking_air", ""); nv[34] = new NameValuePair("wv_booking_facilities", ""); PostMethod pMethod = new PostMethod(bookAction); pMethod.setRequestBody(nv); client.executeMethod(pMethod); String s = pMethod.getResponseBodyAsString(); System.out.println(pMethod.getStatusLine().toString()); System.out.println(s); pMethod.releaseConnection(); ---------------------------------- ========================== If you know what you are doing, it is not called RESEARCH! ========================== --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org