I want to build a simple client application, that will get a urlconnection to a webpage. Send some post data. Get the page that it returns and sends some more post data to that next page... So far I haven't figured out a way to do that. I can use the URLConnection to send post, but what it returns is a InputStream. Is there anyway I can get the new page back in a more manageable format, like for instance have the URLConnection point to the next page that it returns so I can post some more data to that page...
What's your question..?? this stream contains the result of your post command or an error page incase some error occurred..
Joined: Jan 30, 2002
Hi Robert, Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to comply with the JavaRanch Naming Policy. You can change it here. Thank you for your cooperation.
Joined: Oct 31, 2002
The question is: I know the address to the first page, and I know what information I need to post the result is another page that is returned. Well that page that is returned contains a post form also, so I would like to post some information to that page as well. I am wondering if I can do this all with only knowing the first pages address. This is kind of the scenerio that I'm dealing with. The first page has a post form( I will enter my user id and password ), it will then send that form back to the webserver, and the servlet will pass back the result. This servlet is passing my session id around in the URL, this is why I need the same "handle" throughout this process.