Hi,
I tried out this code and it worked for me.
Can you pl. tell us what error you are having?
Are you able to access this url from your browser?
Are you using a proxy to reach this url?
Without knowing what error you are getting, it is difficult to pinpoint the
problem.
Regds,
Gokul
----- Original Message -----
From: "Stephen Fenelon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 19, 2000 4:43 PM
Subject: [SERVLET-INTEREST] get method url problem
> Hi I am trying to retrive a url and println it. I am using the code below
> which dosen't seem to work. Can anyone point me to a example that does a
> "get" on a url or a work around??
>
> thanks
> Stephen
>
> URL url = new URL("http://www.blah_blah.com/index.html");
>
> BufferedReader bin = new BufferedReader (
> new InputStreamReader( url.openStream() ));
>
> String line;
>
> while ( (line = bin.readLine()) !=null )
>
> out.println( line );
>
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html