This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 37865
    
  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
 
wood burning stoves
 
subject: get parameter from ApacheHttpClient in servlet
 
Similar Threads
Use of HttpClient in Applet
HTTPClient time out
Communication with https
Apache HttpClient posing trouble
apache HttpClient make connection for url1 ,if url1 failed connect url2