Click to See Complete Forum and Search --> : How do I fetch a web page?


April 9th, 2000, 12:45 PM
I want to write an application that fetches a web page, given its URL.After writing the application, where do I run it? If I run it from a normal JDK tool will it automatically open the web browser and call the page?Or should I write an applet and call it from the web browser?Please let me know.I am a beginner and do not know where to run the program for such apllications.
Thanks.

poochi
April 9th, 2000, 04:55 PM
If you like to show the page in your application , you have to use JEditorPane ( or JTextPane ).
Take a look at this site :

http://codeguru.developer.com/bbs/wt/showpost.pl?Board=java&Number=3803&Search=true&Forum=java&Words=Simple%20Browser&Match=Whole&Topic=&Searchpage=0&Limit=25
( Comment out proxy related code in it. )

Or if you want to show it in InternetExplorer, you can call Runtime.exec() function , if you are creating an application. ( you need to specify full path of IE ). If you are writing applet ,
you can call "showDocument()" funciton in AppletContext class.

Poochi..