Do something like this
@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.GET) public String myAnotherFunc(HttpServletRequest request,HttpServletResponse response){ //do sume stuffs return "someView"; }
Moinul hossain
source share