I have a form with post method and on submit it redirects to other page.
But after submitting and displaying the result page when I press the back button it displays the blank browser screen with error message to confirm form re-submission.
I know on reload the popup to re submit form appears but can't understand why I'm getting the blank page. Any help will really be appreciated.
Here are my controllers:
@ResponseBody
@RequestMapping(value="/pax-details-redirect", method=RequestMethod.POST)
public ModelAndView getPaxDetails(HttpServletRequest request,ModelMap modelMap){
String selectedOptionKey = request.getParameter("selectedOption");
selectedOptionModelOneWay = TravelportUtil.getSelectedOptionModel(asynchRspOneWay, selectedOptionKey, numberOfAdult, numberOfChildren, numberOfInfant);
modelMap.addAttribute("selectedOptionModelOneWayDetails", selectedOptionModelOneWay);
modelMap.addAttribute("selectedOptionModelOneWaySession", selectedOptionModelOneWay);
return new ModelAndView("pax_details_form");
}
@ResponseBody
@RequestMapping(value="/pax-details", method=RequestMethod.POST)
public ModelAndView getPaxDetails(@ModelAttribute("selectedOptionModelOneWayDetails") DisplayOptionModel displayOptionPaxDetailsModel,
@ModelAttribute("selectedOptionModelOneWaySession") DisplayOptionModel displayOptionSessionModel,ModelMap modelMap){
displayOptionSessionModel.getTravelersList().addAll(displayOptionPaxDetailsModel.getTravelersList());
modelMap.addAttribute("selectedOptionModelOneWaySession",displayOptionSessionModel);
return new ModelAndView("review_pax_and_flight");
}
Thank You.