title: Redirect to external link using spring controller
body: <p>I met in a case such that i have to redirect a link to an external url from a particular controller.I have tried many cases like</p>
  
  <pre><code>response.sendRedirect(url_location);
  </code></pre>
  
  <p>also tried something like this</p>
  
  <pre><code>response.setHeader("location",url_location);
  </code></pre>
  
  <p>tried to send the return type as Model and View too.But nothing works out.Can anyone help me out with it.I've seen many suggest to use sendRedirect and setHeader methods which is not working out in my case.So I would also like to know is there any configurations to be made for using these HTTPServeletResponse's methods.</p>