Are you using a URL connection? Check out java.net.URL and
java.net.HttpURLConnection. URL should work fine - I use it to grab a file
off of a server in an applet I wrote.
Here's a code snippet that should work:
import java.net.*;
URL myFlatFile = new URL ("http://www.myFlatFileSite.com:8080",
"myFlatFile");
BufferedReader in = new BufferedReader (
new InputStreamReader (myFlatFile.openStream
()));
String tmp = "";
while ((tmp = in.readLine ()) != null) {
// do stuff with tmp - it's the flat file being
// read in line by line..
}
> -----Original Message-----
> From: Amy Lounsbury [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 31, 2001 9:29 AM
> To: JRun-Talk
> Subject: HTTP Request
>
>
> Hi everyone,
>
> I am working on a web project where I need to I need to be
> able to make an
> HTTP request, grab the contents of one file (located on a
> separate port) and
> put them into a DHTML menu on the site. This will allow a
> list of the most
> active online discussions to appear in my menu at all times.
>
> I am having trouble grabbing the contents of the originial file and
> inserting it into the new file using JSP. Any ideas would be greatly
> appreciated!
>
> Amy
>
>
> ---------------------------------
> Velir Studios
>
> Amy Lounsbury
> [EMAIL PROTECTED]
> 617.945.2086 | 617.945.1896 fax
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists