Need Help with a Spider Program saving Html Files

I need to know how to save web graphical elements, in the same manner that Internet Explorer saves a web page. I can save the html with no problem. One problem is how does a graphic locate itself on the page site side. The links i have seen do not reference a URL or directory structure. Most of the graphic links start with IMG.
Thank you--

Comments

  • : I need to know how to save web graphical elements, in the same manner that Internet Explorer saves a web page. I can save the html with no problem. One problem is how does a graphic locate itself on the page site side. The links i have seen do not reference a URL or directory structure. Most of the graphic links start with IMG.
    : Thank you--
    :
    All images on website are place by using the image tag. The src attribute gives you the location of the image, either absolute or relative. For more info on the image tag see www.w3schools.com.
  • : : I need to know how to save web graphical elements, in the same manner that Internet Explorer saves a web page. I can save the html with no problem. One problem is how does a graphic locate itself on the page site side. The links i have seen do not reference a URL or directory structure. Most of the graphic links start with IMG.
    : : Thank you--
    : :
    : All images on website are place by using the image tag. The src attribute gives you the location of the image, either absolute or relative. For more info on the image tag see www.w3schools.com.
    :
    Can you explain the src attribute more or is there a site that explains it. Using java, how would I copy an image from an absolute location?
    Thank you--
  • : : : I need to know how to save web graphical elements, in the same manner that Internet Explorer saves a web page. I can save the html with no problem. One problem is how does a graphic locate itself on the page site side. The links i have seen do not reference a URL or directory structure. Most of the graphic links start with IMG.
    : : : Thank you--
    : : :
    : : All images on website are place by using the image tag. The src attribute gives you the location of the image, either absolute or relative. For more info on the image tag see www.w3schools.com.
    : :
    : Can you explain the src attribute more or is there a site that explains it. Using java, how would I copy an image from an absolute location?
    : Thank you--
    :
    This site explains it perfectly: http://www.w3schools.com./html/html_images.asp
    You can give an absolute URL in the src attribute:
    [code]
    image
    [/code]
    This will link the programmers heaven banner in the page.
  • Hi,
    your posting indicates you are trying to create javabase browser in this context java.net.* or Java network programming would be an help to you as it provides option to save the entire page contents as html by opening a read write stream from the specified url.
    your problem of getting the image or graphics element is rather tricky
    if you read a img tag in the stream goto src attribute and try to stream the img file provided at it. Basically you have to work as java stream level to get the job done
    Pls refere to demo programs under swing section provided in JDK developement kit under demo directory there is a sample brower hope it will be a help to you.

    Bye
    Amit

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories