I am redirecting from a controller to another controller. But I also need to pass model attributes to the second controller.
I don\'t want to put the model in sessi
If you want just pass all attributes to redirect...
public String yourMethod( ...., HttpServletRequest request, RedirectAttributes redirectAttributes) { if(shouldIRedirect()) { redirectAttributes.addAllAttributes(request.getParameterMap()); return "redirect:/newPage.html"; } }