hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand HS <anan...@gmail.com>
Subject unable to read request parameters
Date Mon, 19 Oct 2009 23:36:26 GMT
Hi, I am using httpclient 3.0 and trying to post data using PostMethod.
Im required to set Request parameters and retrieve them in my servlet.
Im unable to read the request values that i set in my client.

Here are the various ways in which i have tried to set my parameters -

PostMethod postMethod = new PostMethod(servletUrl);

postMethod.addParameter("abc","abc");
postMethod.setParameter("abc","abc");
NameValuePair nv = new NameValuePair("abc","abc");
postMethod.setRequestBody(new NameValuePair[]{nv});

In my servlet, Im just trying to do request.getparameter("abc") and i always
get null.

Am i missing something. ?

Thanks,
Anand

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message