| Author |
how to pass the hidden form values to the URL in java?
|
Deepa Rajesh
Greenhorn
Joined: Nov 15, 2012
Posts: 2
|
|
I want to get the HTML content of one webpage inside java class.The webpage is using some hidden form fields to be set for getting proper webpage.
I am using the java.net.URL class to call the webpage.
is it possible to set the hidden form fields in java itself?
Please help.
|
 |
Ivan Jozsef Balazs
Ranch Hand
Joined: May 22, 2012
Posts: 380
|
|
|
Hidden fields are transferred in the same way as text fields, also depending on whether the method is GET or POST.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12269
|
|
What do you man by "call the webpage"?
Form values, hidden or not, are formatted by the BROWSER into a HTTP request (GET or POST) which gets sent to a service.
Are you are trying to emulate a browser sending FORM values?
Bill
|
Java Resources at www.wbrogden.com
|
 |
Deepa Rajesh
Greenhorn
Joined: Nov 15, 2012
Posts: 2
|
|
I have a client URL .I should call the URL and get the HTML Content of the page and i should process the html page content (listing the product details).
I can get the HTML Content of the page using HttpURLConnection.getContent();
But , the html content is differ if we send some hidden form fields. that is the case , i should send the form hidden field values using Java or servlet .I have only the client URL and the form name.
|
 |
 |
|
|
subject: how to pass the hidden form values to the URL in java?
|
|
|