title: How to redirect with POST variables with Spring MVC
body: <p>I have written the following code:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Controller
      @RequestMapping("something")
      public class somethingController {
         @RequestMapping(value="/someUrl",method=RequestMethod.POST)
         public String myFunc(HttpServletRequest request,HttpServletResponse response,Map model){
          //do sume stuffs
           return "redirect:/anotherUrl"; //gets redirected to the url '/anotherUrl'
         }
  
        @RequestMapping(value="/anotherUrl",method=RequestMethod.POST)
        public String myAnotherFunc(HttpServletRequest request,HttpServletResponse response){
          //do sume stuffs
           return "someView"; 
        }
      }
  
  </code></pre>
  
  <p>How would i be able to redirect to "anotherUrl" request mapping whose request method is POST?</p>