aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes HttpURLConnection question on POST Method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "HttpURLConnection question on POST Method" Watch "HttpURLConnection question on POST Method" New topic
Author

HttpURLConnection question on POST Method

Kumar Jaya
Ranch Hand

Joined: Jan 12, 2009
Posts: 45
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
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
"Request properties" are HTTP headers, not HTML form parameters. See #135 here for an example of how to POST using HttpURLConnection.


Android appsImageJ pluginsJava web charts
Kumar Jaya
Ranch Hand

Joined: Jan 12, 2009
Posts: 45
Thanks Ulf, that was really useful.

Cheers,
Kumaravel J
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpURLConnection question on POST Method
 
Similar Threads
how to acces a remote servlet from a java client?????
Connecting to the webserver from simple java program with main method
Cookies from Servlets sendRedirect
Communication between a Swing Client and a Servlet via HttpURLConnection
Cookies from Servlets sendRedirect