• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with HttpURLConnection  RSS feed

 
Brian Stelzer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Sockets forum.
 
Robert Z
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gabor Ui
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
here is a quite good book (i think good at basic level) with related package handling also forms and posting.
http://www.jeffheaton.com/java/bot/
http://www.jeffheaton.com/java/bot/updates.shtml
i can suggest to check it.
Gabor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!