Hi Robert,

I have a servlet which tries to read two parameters (ID, Type) from the 
incoming request using request.getParameter(XXX) and then read the content of 
the request (xml data in my case)  using request.getInputStream().read(...). 
I've read a tutorial in which it was said that I can add parameters to the post 
using addParameter(...) and then adding content using setResponseBody(...). In 
version 3 of the HttpClient  I use post.setRequestEntity(new 
StringRequestEntity(...)) instead.

When I misunderstood something I would really like to get some help.

Thanks, Lothar

"HttpClient User Discussion" <[email protected]> schrieb am 
09.01.06 17:27:12:
> 
> Hello Lothar,
> 
> > After playing around a while I found out that in 
> > PostMethod.setRequestEntity()
> > the method clearRequestBody() is called.  In that method all parameters 
> > will be
> > deleted by this.params.clear(). Is that realy wanted ?
> 
> Yes.
> 
> > Maybe super.clearRequestBody() needs to be called ? And when I first call
> > setRequestEntity() and then addParameters() the requestBody will be deleted.
> > So actually I can't set parameters and data for the body at same time !?
> 
> What data is there except parameters? You can either add parameters to the
> PostMethod from which the request entity (body) will then be generated, or
> you set the request entity directly, for example as a MultipartRequestEntity.
> In that case, you add the parameters to the request entity, not the method.
> 
> cheers,
>   Roland
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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

Reply via email to