Solved

Multiple posts to HttpURLConnection

Posted on 2002-04-27
6
282 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 75 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb entity bean example issue 2 43
Eclipse for Java EE development 2 68
Java import explained 4 47
Java regex 5 21
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

734 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