title: How to compare two URLs in java?
body: <p>Here's a simple problem - given two urls, is there some built-in method, or an Apache library that decides whether they are (logically) equal?</p>
  
  <p>For example, these two urls are equal:</p>
  
  <pre><code>http://stackoverflow.com
  http://stackoverflow.com/
  </code></pre>