title: Spring, redirect to external url using POST
body: <p>In the following Spring 3.1 action, I've to do some stuff and add attribute to a POST request, and then redirect it to external URL through POST (I can't use GET).</p>
  
  <pre><code>@RequestMapping(value = "/selectCUAA", method = RequestMethod.POST)
  public ModelAndView selectCUAA(@RequestParam(value="userID", required=true) String cuaa, ModelMap model) {
      //query &amp; other...
      model.addAttribute(PARAM_NAME_USER, cuaa);
      model.addAttribute(... , ...);
      return new ModelAndView("redirect:http://www.externalURL.com/", model);
  }
  </code></pre>
  
  <p>But with this code the GET method is used (the attributes are appended to <a href="http://www.externalURL.com/" rel="noreferrer">http://www.externalURL.com/</a>). How can I use the POST method? It's mandatory from the external URL.</p>