dummy dum <[EMAIL PROTECTED]> wrote:
Hi,
I had posted a html parameter to the a java servlet using
org.apache.commons.httpclient.methods.PostMethod
but iam retrive the posted data(param-name) using
javax.servlet.http.HttpServletRequest.getParameter("paramname")
i get a "null" value. I searched forums but Iam not able get the solution.
httpclient version used: commons-httpclient-3.0-rc2
<The code I used is>
HttpClient httpClient = new HttpClient();
PostMethod postMethod = new PostMethod("url");
NameValuePair[] data= new NameValuePair[1];
data[0] = new NameValuePair("paramname", "paramvalue");
postMethod.setRequestBody(data);
int httpStatus = httpClient.executeMethod(postMethod);
InputStream in = postMethod.getResponseBodyAsStream();
...........
<The java servlet code is >
String parameterValue =
javax.servlet.http.HttpServletRequest.getParameter("paramname");
could u help in this ASAP.
thanks in advance,
the dummy
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.