?
Solved

Multiple posts to HttpURLConnection

Posted on 2002-04-27
6
Medium Priority
?
284 Views
Last Modified: 2008-03-06
I am able to post data and read the response on a HttpURLConnection, and I am able to do so repeatedly if I execute multiple URL.OpenConnection methods, create new input and output streams, etc.

Do I have to repeat all of these steps each time I want to do a POST/Read to the UL?

Thanks
0
Comment
Question by:garyz31
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6974423
Depends on the HTTP server/servlet/cgi and proxys you are talking to.
0
 
LVL 1

Author Comment

by:garyz31
ID: 6974482
These are asp pages.
0
 
LVL 1

Author Comment

by:garyz31
ID: 6975552
I've also noticed that if I post data to a page, then I must read the response in order for the post to happen.  This seems to be the case even if the page doesn't have any response.  

Are my parameter settings causing this?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 92

Accepted Solution

by:
objects earned 300 total points
ID: 6975670
I'd say you'd have to call openConnection each time then.
Have you just tried reading the response status? This should be enough to make the post happen.
0
 
LVL 1

Author Comment

by:garyz31
ID: 6979281
Reading the response code does cause the post to happen.

Thanks
0
 
LVL 92

Expert Comment

by:objects
ID: 6979296
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question