add this :
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
before BufferedReader .
-----------------------
Sujoy ,
eGain Comm. Corp. , CA,
Phone # +91-20-4222812 Ext: 211
--------------------------------------------------------
Don't speak unless you can improve on the silence.
----- Original Message -----
From: Stephen Fenelon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 19, 2000 4:43 PM
Subject: 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