Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

get parameter from ApacheHttpClient in servlet  RSS feed

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're confused about how web apps work: only strings are passed between the server and the client.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. Thank you for the Clarification
 
Campbell Ritchie
Marshal
Posts: 55751
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it's late, but I think this thread would sit better on our Sevlets forum.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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().
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!