Duplicate:
I’m developping an application that consists on: the user inputs an URL of some website, and then the application have to analyze that URL.
How can I have access to the HTML file, using Java? Does I need to use HttpRequest? How does that works?
Thks.
URLConnection is fine for simple cases. When there are things like redirections involved, you are better off using Apache’s HTTPClient