Page 1 of 2 12 LastLast
Results 1 to 20 of 22
Like Tree2Likes

Thread: Saving WebPages

  1. #1
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Saving WebPages

    Hello...
    I am interested in making an application which will save any webpage and stored it in a folder with "images and format" ...
    How can I do it ?
    I did it by taking the source of the page and creating a html file..
    But when I open that file it do not show the images and original format of that webpage..
    I want that webpage to be open along with images and format of the text...
    somebody please help...
    Thank you

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: Saving WebPages

    Moved from Advanced Java. Haven't-a-clue questions can't be considered 'advanced'

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default Re: Saving WebPages

    An html file refers to images and css files and possible *cough* javascript files ... it's like ripping the intestines from a beautiful lady; those intestines don't resemble a beautiful lady by far.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    But then is it possible to open that saved pages when I am not connected to Internet ??

  5. #5
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    Sir I wanted to make project..
    we are making bookmarks
    and to open that bookmarks we need internet to load that page..
    But I want to open that page without taking help of internet...
    So for that we need to save the page...
    for this I want procedure to save pages properly...
    I want to save pages in a folder...

  6. #6
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: Saving WebPages

    Most modern browsers have a "cache" or "offline mode". Perhaps you should look into that?

  7. #7
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    Thank you sir for explaining me..
    I understood how exactly it works..
    but I have doubt
    Now if we are saving the page by right click on page --> save page as method
    the page is being saved and when we are opening that page without an internet connection the page is opened as it is with proper images and format..
    Whats the logic behind that??

  8. #8
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: Saving WebPages

    I understood how exactly it works..
    Whats the logic behind that??
    I believe that these statements contradict each other. Have you looked into the files generated by saving a page?

    the page is being saved and when we are opening that page without an internet connection the page is opened as it is with proper images and format..
    So what's the problem? You want to automate this?

  9. #9
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    Only one file is created .htm
    and when we are clicking on this .htm file it is opened how the exact original page is....here why the page comes up with proper images when there is no internet connection...
    and what I understood is why the images are not there when i am saving only HTML code of that page.....

  10. #10
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: Saving WebPages

    Only one file is created .htm
    That's not correct. Go save it again, but in an empty folder, and see what happens. Although your browser might not implement it the same way as Chrome. So use Chrome, and see what happens.

  11. #11
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    ok sorry Sir I was wrong I just didnt see the another folder which is created with it ..
    Is there any way to link this with the help of the folder which is created ...

  12. #12
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    Just now i tried to save the way2sms.com site home page it didnt created any folder only a single .htm file...

  13. #13
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: Saving WebPages

    Is there any way to link this with the help of the folder which is created ...
    Link what? The .htm? Your database? A small mammal?

  14. #14
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    link the .htm file with contents of the created folder and display the page as it is...

  15. #15
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    It created the folder but when i am trying to save the page in an empty folder but when i am saving page on desktop it creates only .htm file

  16. #16
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: Saving WebPages

    Please do not double post - use the edit button to add the information to your post.

    Second, I'm not sure what the problem is. When you open a .htm file, it loads the corresponding images from the created folder. That seems pretty linked to me. So what do you mean when you say "link"?

  17. #17
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: Saving WebPages

    Ok, I'm just going to jump in and say that what you are trying to do is a messy problem if you want it done correctly, and that there are many apps available (free even) that already do this. That being said, in order to make pages renderable in a browser, you will need to do a lot of link translation, and a lot of additional file download. You will need to manually parse the html with a DOM utility of some sort, and build a list of all the linked resources (as others have mentioned - css, javascript, images, etc...) and then download those resources as well. You will also need to translate any absolute links to relative links and recreate the server side file structure locally. If you don't do all of this, you end up with a really basic html page with no images, styles, or working links. Also, a lot of content is dynamic these days, and with ajax all over the place, some pages will be near impossible to retrieve correctly.

    This wasn't such a bad problem in the 90's, but these days, I'm not sure it's worth your time. Use an app!

  18. #18
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    I am using netbeans and creating a simple java application...
    and this I am making for college project...

  19. #19
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: Saving WebPages

    A word of advice: find another project. This one isn't going to succeed. Not in Java at least, and certainly not in
    a simple java application
    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  20. #20
    akshaydusane is offline Member
    Join Date
    May 2012
    Posts
    22
    Rep Power
    0

    Default Re: Saving WebPages

    will you suggest some ??
    it will be helpful to me....

Page 1 of 2 12 LastLast

Similar Threads

  1. Using multiple IP adresses to download webpages
    By nisaloncaje in forum Networking
    Replies: 0
    Last Post: 04-26-2012, 11:46 PM
  2. how to display webpages on swings/awt
    By damuammu in forum AWT / Swing
    Replies: 2
    Last Post: 04-19-2012, 08:31 PM
  3. Using Java to Download Webpages
    By JimmyD in forum Networking
    Replies: 2
    Last Post: 04-17-2012, 02:31 AM
  4. Deployment of JSP and other language webpages on same server???
    By anup1710 in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 02-01-2011, 05:48 PM
  5. Java and Webpages
    By maniaco in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 09:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •