title: How to redirect to another site in Spring MVC JavaEE
body: <p>I've been googling a while and I couldn't find a clear answer or documentation about this specific method.</p>
  
  <p>I want to redirect to another site, like stackoverflow.com using this method... But I don't know how to do it. Any help will be appreciated.</p>
  
  <pre><code>@RequestMapping(value = "/redirectTravelocity", method = RequestMethod.GET)
  private ModelAndView processForm()
  {
      ModelAndView modelAndView = new ModelAndView( "redirect:stackoverflow.com" );
      Map&lt;String, Object&gt; model = modelAndView.getModel();
  
      model.put( "error", "this.is.my.error.code" );
      return new ModelAndView( "redirect:stackoverflow.com", model );
  }
  </code></pre>
  
  <p>It doesn't work, it redirects within my site and it crashes... I know this is stupid but I don't know how to do it.</p>