This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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...
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
posted
0
Moving this to the Sockets forum.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Robert Z
Greenhorn
Joined: Jan 18, 2001
Posts: 5
posted
0
What's your question..?? this stream contains the result of your post command or an error page incase some error occurred..
robert
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
posted
0
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.
Brian Stelzer
Greenhorn
Joined: Oct 31, 2002
Posts: 29
posted
0
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.