Nice code sample, but if you are going to insert the text from a remote
webpage into a local rendering you must strip the <body> tags. You should
also strip the <html> tags as well.
On Tue, 22 Jun 1999, Inigo Betanzos wrote:
> String urlfich="http://eeee.dddd.com";
> URL urlfi=new URL(urlfich);
> InputStream fin = urlfi.openStream();
> InputStreamReader isr=new InputStreamReader(fin);
> BufferedReader br=new BufferedReader(isr);
> String linea=br.readLine();
> String pagecontent="";
> while (linea!=null) {
> pagecontent += linea;
> }
>
> This is the code to obtain the lines from an url and put them into a String;
___________________________________________________________________________
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