title: html response in java + jsoup
body: <p>I am working in Java and using JSoup to get the response of webpage.</p>
  
  <p>While I am printing doc in html file, I am not able to get the page as it is. reason is it looks the css and js in wrong path.</p>
  
  <p>Here the piece of response,</p>
  
  <pre><code>    &lt;link href="../Style/STYLE.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="../Style/NKN.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="../Style/main.css" rel="stylesheet" type="text/css"&gt;
      &lt;script src="../Script/Validation.js" type="text/javascript"&gt;&lt;/script&gt; 
      &lt;script src="../Script/grid.js" type="text/javascript"&gt;&lt;/script&gt; 
      &lt;script src="../Script/api.js" type="text/javascript"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p>While I am looking this in webpage view source and click on css, it goes to other url as follows,</p>
  
  <pre><code>    &lt;link href="http://www.url.com/Style/STYLE.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="http://www.url.com/Style/NKN.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="http://www.url.com/Style/main.css" rel="stylesheet" type="text/css"&gt;
      &lt;script src="http://www.url.com/Script/Validation.js" type="text/javascript"&gt;&lt;/script&gt; 
      &lt;script src="http://www.url.com/Script/grid.js" type="text/javascript"&gt;&lt;/script&gt; 
      &lt;script src="http://www.url.com/Script/api.js" type="text/javascript"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p>I found a way to get absolute urls using Jsoup using Elements as follows,</p>
  
  <pre><code>    Elements links = document.select("link[href]");
      for (Element link : links) {
        system.out.println(link.attr("abs:href"));
      }
  </code></pre>
  
  <p>But it is useful for only iterating and printing the links, How may I replace in response doc.</p>