Announcement Announcement Module
Collapse
No announcement yet.
doing a redirect but using post Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • doing a redirect but using post

    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

  • #2
    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.

    Comment


    • #3
      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

      Comment


      • #4
        or is there a way to create this in the response object?

        Comment


        • #5
          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?
          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.

          Comment

          Working...
          X