Google Answers Logo
View Question
 
Q: HTTPURLconnection ( No Answer,   1 Comment )
Question  
Subject: HTTPURLconnection
Category: Computers
Asked by: sridharpaidi-ga
List Price: $2.00
Posted: 06 Jul 2004 13:36 PDT
Expires: 05 Aug 2004 13:36 PDT
Question ID: 370453
How to pass session values in HTTPURLconnection

Clarification of Question by sridharpaidi-ga on 06 Jul 2004 15:24 PDT
I want to pass Browser session object. This session has Cookies
information also. The URl that I am calling needs sone of the Cookies
set in the browser.
Answer  
There is no answer at this time.

Comments  
Subject: Re: HTTPURLconnection
From: corwin02-ga on 06 Jul 2004 14:27 PDT
 
http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html

String url = "http://www.marchal.com/",
       proxy = "proxy.mydomain.com",
       port = "8080";
URL server = new URL(url);
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost",proxy);
systemProperties.setProperty("http.proxyPort",port);
HttpURLConnection connection = (
    HttpURLConnection)server.openConnection();
connection.connect();
InputStream in = connection.getInputStream();
readResponse(in);

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy