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).
@RequestMapping(value = "/selectCUAA", method = RequestMethod.POST)
public ModelAndView selectCUAA(@RequestParam(value="userID", required=true) String cuaa, ModelMap model) {
//query & other...
model.addAttribute(PARAM_NAME_USER, cuaa);
model.addAttribute(... , ...);
return new ModelAndView("redirect:http://www.externalURL.com/", model);
}
But with this code the GET method is used (the attributes are appended to http://www.externalURL.com/). How can I use the POST method? It's mandatory from the external URL.