title: Call an external web service from a servlet
body: <p>I'm developing a servlet that gets a name of a web service and could be forward the request to an external web service, for example: <code>http://www.webservice.com/...</code></p>
  
  <p>I have build a response wrapper that intercept response output but I can't forward request to an external web service, it works only if I redirect the request to a servlet that is on same server.</p>
  
  <p>Example:</p>
  
  <pre><code>request.getRequestDispatcher("aMyServlet").forward(request, response) // WORKS
   request.getRequestDispatcher("http://www.webservice.com/...").forward(request, response)
  </code></pre>
  
  <p>Doesn't because Tomcat searches <code>http://www.webservice.com/...</code> on the server as a local resource.</p>
  
  <p>How can I do external request?</p>
  
  <p>Thanks</p>