• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Problems with HttpURLConnection

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the Sockets forum.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Why is the word "abbreviation" so long? And this ad is so short?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic