hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ever friend <ever_frien...@yahoo.com>
Subject httpclient4 app cause serverside-servlet request.getparameter() return null?
Date Mon, 03 Mar 2008 01:57:36 GMT
  New to httpclient4.
  Have a problem when I tried to udpate my application from httpclient3.x to httpclient4.
  I got the error at server side: 
request.getParameter("paraName") returns null. 
  (serverside is an applicaiton running on Jboss).

  Here is the code on client side: 
// prepare parameters 
HttpParams params = new BasicHttpParams(); 
params.setParameter("paraName", "test"); 
HttpClient httpClient = new DefaultHttpClient(); 
  httpPost = new HttpPost("http://www.mydomain.com/servletTest); 
HttpResponse response = httpClient.execute(httpPost); 
  The servletTest at server application does receive the http request, 
but when it calls request.getParameter("paraName"), it gets null. 
  Did I miss anything here? 
  When I use httpclient3.x for this kind of functions, it works fine. 
  Thank you for any feedback and help! 

Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message