How can I get absolute path of providing url in java
<p>I want to get absolute path of url. For example, <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> will give me tomcat home page available in root directory. How can I get absolute path of tomcat root directory by providing its url <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> in java.</p>

<p>I found similar question but not found satisfactory answer so I am posting problem here.</p>
