wood burning stoves 2.0*
The moose likes Servlets and the fly likes get parameter from ApacheHttpClient in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "get parameter from ApacheHttpClient in servlet" Watch "get parameter from ApacheHttpClient in servlet" New topic
Author

get parameter from ApacheHttpClient in servlet

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi Folks,

I am calling a servlet from a simple java class using ApacheHttpClient. and also i am setting an Object



now i want to get the DTO objcet in servlet .
i tried like this but it returns null. please correct me
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I think you're confused about how web apps work: only strings are passed between the server and the client.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Ok. Thank you for the Clarification
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38509
    
  23
I know it's late, but I think this thread would sit better on our Sevlets forum.
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 605

I don't understand why the code compiles in the first place.

The setParameter has setParameter(String parameterName, String parameterValue) -- however it belong to the PostMethod
class. getParams() returns a HttpMethodParams which does not have any method called as setParameter().

Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
 
 
subject: get parameter from ApacheHttpClient in servlet