|
Here's a little program I wrote once upon a time that might help. It's very basic...just pass in the URL as an argument to the program. Brad Grier Linoma Software import java.net.*; import java.io.*; public class HTTPReader{ public static void main(String[] try{ URL url = new URL(args[0]); BufferedReader in = new BufferedReader( new nputStreamReader( url.openStream() ) ); String s; while( (s = in.readLine()) != null){ System.out.println(s); } } catch(MalformedURLException e){ System.out.println("URLException:"+e); } catch(IOException e){ System.out.println("IOException:"+e); } } } ----- Original Message ----- From: David Gibbs <David.Gibbs@IL.US.MKS.com> To: 'JAVA/400 Mailing List' <JAVA400-L@midrange.com> Sent: Wednesday, August 04, 1999 10:58 AM Subject: Java class to retrieve a web URL? > Folks: > > Does anyone know of a open source Java class that will retrieve a web URL > and return the results as a String? > > I need to access a web site from an AS/400 system and am investigating > possible alternatives to writing my own sockets program. > > Thanks! > > david > > > -- > > David Gibbs > Sr. Software Engineer > Mortice Kern Systems US, Inc. > 2500 S. Highland Ave., Suite 200 > Lombard, IL 60148 > > phone: (630) 495-2108 x5004 > http://www.mks.com <http://www.mks.com/> > mailto:dgibbs@mks.com <mailto:dgibbs@mks.com> > > > Opinions expressed are strictly my own and do > not necessarily reflect those of my employer. > > > +--- > | This is the JAVA/400 Mailing List! > | To submit a new message, send your mail to JAVA400-L@midrange.com. > | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. > | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner: joe@zappie.net > +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.