my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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: 38033
    
  22
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: 597

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get parameter from ApacheHttpClient in servlet
 
Similar Threads
Use of HttpClient in Applet
Apache HttpClient posing trouble
HTTPClient time out
Communication with https
apache HttpClient make connection for url1 ,if url1 failed connect url2