Hi Roland,

Sorry I don't understand. 

As you said, because the container already read the body, the
request.getInputStream() gets nothing?

Then what is the purpose of request.getInputStream()? It is always empty
anyway.

thanks,

Han



Roland Weber wrote:
> 
> Hello Han,
> 
>>_          webpage="http://m168.com/test_servlet";;
>>_          HttpClient client = new HttpClient();
>>_          PostMethod httppost = new PostMethod(webpage);
>>_
>>_          ServletInputStream sis=  request.getInputStream();
>>_          httppost.setRequestBody(sis);
>>_
>>_          client.executeMethod(httppost);
>>_
>>_Please give me a hint about what is wrong here.
> 
> The ServletInputStream is empty because the servlet
> container already read the body in order to parse
> the parameters. You'll see them as parameters in the
> HttpServletRequest.
> 
> hope that helps,
>   Roland
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/postmethod-does-not-work-tf4719655.html#a13508980
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to