• Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpURLConnection question on POST Method

 
Kumar Jaya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using a HttpURLConnection to connect to a servlet. I am sending some request parameters on the client, which I am not able to receive in my servlet code.

Client Side
-------------


Servlet Side
--------------



prints Name: null

What am I missing?? Am I doing something wrong??

Regards
Jaya
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Request properties" are HTTP headers, not HTML form parameters. See #135 here for an example of how to POST using HttpURLConnection.
 
Kumar Jaya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf, that was really useful.

Cheers,
Kumaravel J
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!