How to download WWW pages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob Ketzscher

    How to download WWW pages

    This is probably extremely easy for most of you, but how do I download the
    source code of a web page?

    Say I got an applet and when I press a button it will then go download the
    HTML source code (as plain text) for a certain web address, say
    http://abc.com/index.html and I can then manually (well with other Java
    code) go through the page and extract the information I want and then
    display it in my applet. I don't want to actually show the page in my
    applet. The reason behind this is that I would like to extract some table
    entries from an external page and combine the results. Going through the
    source code shouldn't be to hard.

    Many thanks for any help

    Rob


  • PerfectDayToChaseTornados

    #2
    Re: How to download WWW pages

    "Rob Ketzscher" <ketzscher@hotm ail.com> wrote in message
    news:cfakli$d7g $1@wisteria.csv .warwick.ac.uk. ..
    | This is probably extremely easy for most of you, but how do I download the
    | source code of a web page?
    |
    | Say I got an applet and when I press a button it will then go download the
    | HTML source code (as plain text) for a certain web address, say
    | http://abc.com/index.html and I can then manually (well with other Java
    | code) go through the page and extract the information I want and then
    | display it in my applet. I don't want to actually show the page in my
    | applet. The reason behind this is that I would like to extract some table
    | entries from an external page and combine the results. Going through the
    | source code shouldn't be to hard.
    |
    | Many thanks for any help
    |
    | Rob

    Look in the java.net package, there is plenty there to get you started :-)
    --
    -P
    "Much as some folks hate to lose their way, me, I pray to God that I will."
    |


    Comment

    • KrOoSh

      #3
      Re: How to download WWW pages

      You can make use of HttpClient
      (http://jakarta.apache.org/commons/httpclient/) to retrieve the page,
      then do whatever you want with it.



      "Rob Ketzscher" <ketzscher@hotm ail.com> wrote in message news:<cfakli$d7 g$1@wisteria.cs v.warwick.ac.uk >...[color=blue]
      > This is probably extremely easy for most of you, but how do I download the
      > source code of a web page?
      >
      > Say I got an applet and when I press a button it will then go download the
      > HTML source code (as plain text) for a certain web address, say
      > http://abc.com/index.html and I can then manually (well with other Java
      > code) go through the page and extract the information I want and then
      > display it in my applet. I don't want to actually show the page in my
      > applet. The reason behind this is that I would like to extract some table
      > entries from an external page and combine the results. Going through the
      > source code shouldn't be to hard.
      >
      > Many thanks for any help
      >
      > Rob[/color]

      Comment

      Working...