There is a good code sample given at http://code.google.com/appengine/docs/java/urlfetch/usingjavanet.html
that gives an example of how to make a post request to post comments on a web page.
The relevant code is given below-
I want to submit a post request to a form that contains some text fields, a drop down list box, as well as a captcha field with text box named "Captcha". While the form action="http://domain.com/submit.php" the captcha field is linked to captcha image that is generated by page "http://domain.com/captcha.php".
I already have all details about the form with me, now I want to make post request to this form by modifying the above code sample... What I am unable to figure out, is how to map the captcha field with the file "captcha.php"? Ideally I want to display the captcha on screen and ask the end user to fill it in... Once user fills it in, this field along with rest of the values can be submitted to the form... I particularly like this way of submission because the response to submission will also be available to the program directly...Is it possible to submit data to such a form? How do I do this. For now you can take for example total 3 fields in the form "UserID" (Text) "Password" (Text) and "Captcha". How do I treat the captcha value, show it and then submit it? If the captcha is shown on screen, then wont this be a unique value only for that occurence of form? And we are trying to directly submit to form by encoding various parameters, how do we decide on a value for captcha in such a scenario?
Any help/pointers in this regard would be highly appreciated.