I am trying to automate a form POST operation for a secure logon page. One of the form input tags looks like this:
<input type="hidden" name="a_name" value=""/>
The tag is all in lower case as shown. (Other INPUT tags in the same form are in upper case, but I didn't think that mattered.) The "/" following the empty
string at the end of the tag is shown in red when the page source is viewed in Mozilla Firefox. When I use URLEncoder.encode("","UTF-8") to represent the empty string value in the POST string, nothing is inserted.
The POST operation otherwise transmits fine and returns a response fine, but the response indicates that the field values are incorrect and the logon is unsuccessful. I don't think I am properly representing the ""/ value in the POST string, and I think the red slash is a clue. Does anyone have any ideas or suggestions?
More generally, what is the proper way to represent an empty string value in a POST string?
Many thanks.
Bill Denniston