hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: POST method problem(if read a request parameter)
Date Tue, 04 Dec 2007 12:13:32 GMT
Hello Mukesh,

> HttpServletRequest request
> 
> But if I read any request parameter from the request before executing
> the request, [...] The Post request fails [...]

If you call HttpServletRequest.getParameter(), the servlet
container will read the request entity to merge the parameters
sent in the body with the query parameters in the URL.

> I don't not have access to the external server, so I can't see what
> might be wrong. But this is quite strange behavior. I need access the
> above said request parameter in my servlet for some validation.

If it's a query parameter you need, try to obtain the URL
from the servlet request and get the parameter from there.
Otherwise, use HttpServletRequest.getParameter() and create
a new request entity from the parameters when forwarding
the request, instead of using getInputStream().

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message