So I'm coding in JSP language but I need to do this in a java servlet. I have a way inside the java program (servlet) to get a URL entered by a user. I stored the URL inside a string. Now all that is left to do is to get the page title information from the URL or the website. Essentially I want to get the title tag inside the html code from the URL. I have never done this before so I was wondering if anyone could give me any pointers on how to do this.
For example lets say i want to get the page title from http://www.computerhope.com/issues/ch000746.htm
When I look at the html code it shows it's "How to view the HTML source code of a web page" as shown in the html code.
<title>How to view the HTML source code of a web page </title>
So how would I be able to access that inside a java program?