Meaningless Drivel is fun!*
The moose likes Sockets and Internet Protocols and the fly likes how to pass the hidden form values to the URL in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to pass the hidden form values to the URL in java?" Watch "how to pass the hidden form values to the URL in java?" New topic
Author

how to pass the hidden form values to the URL in java?

Deepa Rajesh
Greenhorn

Joined: Nov 15, 2012
Posts: 5
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
Rancher

Joined: May 22, 2012
Posts: 866
    
    5
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: 12758
    
    5
I am using the java.net.URL class to call the webpage.


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
Deepa Rajesh
Greenhorn

Joined: Nov 15, 2012
Posts: 5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to pass the hidden form values to the URL in java?
 
Similar Threads
Need to save a response , before sending it th the client
JDBC-3 Design Question
Problem while connecting to Servlet
how can I get the status of webservice
Remote EJB URL Issue