Results 1 to 3 of 3
- 03-27-2009, 11:19 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 2
- Rep Power
- 0
How to download temporary files as well as web page
I am writing an application using JDK. I use URL class to create URLConnection to download a web page to parse out some strings and etc.
It works fine if I only parse string in its html page.
As we all know, using IE to open a web page will download all temporary files at "Temporary Internet Files" folder, image file, mp3, and etc
How can I write Java application by using URL/URLConnection/HttpURLConnection classes to not only download a web but all media or objects used by the page and be able to access to those objects WITHOUT opening IE?
I have been searching and reading all over the place and could not find any clue. I would really appreciate it if some experts share some tips here of how to do it.
Thanks
- 03-28-2009, 01:22 AM #2
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
basically anything that's a "src" attribute must be downloaded. there's probably more, but that's a start. just parse the html and when you come across an attribute you need to download, download that as well.
- 03-28-2009, 06:50 AM #3
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
You are basically implementing the guts of a browser. This is not a trivial task, since you must first parse the HTML (IMHO, the built-in HTML parsing code in the current Java release is almost worthless for this purpose), and then familiarize yourself with the voluminous W3C HTML specs to figure out when you need to request objects.
However, there are tools out there such as Internet Download Manager that already have such functionality. Why not just use one of those?
Similar Threads
-
how to upload/download files using javascript and html
By kuppi in forum Java AppletsReplies: 1Last Post: 11-06-2008, 04:47 AM -
How to get the temporary deployment folder of ejb from jboss
By ms987654321 in forum Advanced JavaReplies: 1Last Post: 08-22-2008, 12:41 PM -
setting the view to a jsp page from a self refeshing page
By deepal_205 in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 08-15-2008, 04:41 PM -
warning that page has expired and i need to refresh the page again
By 82rathi.angara in forum JavaServer Pages (JSP) and JSTLReplies: 5Last Post: 07-15-2008, 01:48 PM -
how direct her/ him to the Sun´s download page?
By willemjav in forum Java AppletsReplies: 1Last Post: 04-17-2008, 04:03 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks