You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Lee Wai See <le...@stee.stengg.com> on 2006/09/28 12:07:22 UTC

Using HttpClient for sender and HttpServlet for receiver for parameters

Hi,

 

I have the following situation which I hope someone would be able to help me
with.

 

On the sender side, I am using HttpClient and have these few lines:

HttpClient httpClient = new HttpClient();

            postMethod.addParameters (data);        // data is of type
NameValuePair[]

            httpClient.executeMethod(postMethod);

 

On the receiver side, I need to use the javax.servlet.http.HttpServlet with
the HttpServletRequest req. How can I get the parameters of NameValuePair[].
If I do a req.getParameter(), I will only get the first element of the
NameValuePair[].

 

I want to get all the elements of NameValuePair[]. How can I go about doing
it? It would be greatly appreciated if someone could guide me in this.
Thanks in advance.

 

Regards, 
Lee Wai See

 


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006
 

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---