I need to write a java program to to save a complete webpage including images etc. to my local disk? How do I achieve this? If I use a URL connection, I can only save the page and not its resources like images etc.
You will need to parse the content, possibly modify it because of links to resources on different servers, or in paths that are not a sub folder of the web page's folder (e.g. src="../images/image.gif"). That's not a trivial job though. Regular expressions or a proper HTML parser can help you out here.