Is there a way to forward a request to another Controller while adding some parameter data to it? I tried adding to the ModelMap, but it doesn\'t seem to hang around. I am d
I've found this post, that uses an HttpRequestWrapper:
First:
Define the HttpRequestWrapper and override the methods getParameter, getParameterMap, getParameterNames and getParameterValues like in the post.
Second:
Forward via RequestDispatcher to your url, using the wrapped request in the method parameters:
request.getRequestDispatcher("myForwardUrl").forward(new MyRequestWrapper(request), response);
I've tried this out for deleting of parameters (which is even more difficult!) and it works!