I'm doing something like the following in one of my controllers:
return new ModelAndView("redirect:" + someURL);
Is there a way to do the redirect as a post instead of a get?
thanks in advance,
Mike
I'm doing something like the following in one of my controllers:
return new ModelAndView("redirect:" + someURL);
Is there a way to do the redirect as a post instead of a get?
thanks in advance,
Mike
No. This is a limitation of HTTP. See http://www.w3.org/Protocols/rfc2616/...0.html#sec10.3 and http://ppewww.ph.gla.ac.uk/~flavell/www/post-redirect.html.
Thanks for the info.
Maybe there is a different way of doing this. Is there a way to return a view that will go to a different site? Something like:
return new ModelAndView("http://www.foo.com/bar.htm");
...but have it post the variables to the other site?
thanks again,
Mike
or is there a way to create this in the response object?
Not out of the box as far as I know. You could implement a yukky workaround - a form that is pre-populated and submits on loading.Is there a way to return a view that will go to a different site...but have it post the variables to the other site?