Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading from a URL

Status
Not open for further replies.

nero

Programmer
Sep 11, 2000
25
AU
Hi all.

Question:
From within a template I am trying to call another site. I have created a URL object, read from the URL and BufferRead the html back to my content area within the template. This is fine, except....

It appears that not all the headers that exist while interacting with the current WebApp site that I am in, are sent to the site I have just read the URL of.

Is there a method of sending the current set of headers along with my request to read to url?

For clarification I include the code to read from the URL:

URL incPage = new URL("BufferedReader in = new BufferedReader(
new InputStreamReader(
incPage.openStream()));
String inputLine;

while ((inputLine = in.readLine()) != null)
out.println(inputLine);

in.close();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top