Announcement Announcement Module
No announcement yet.
RedirectView as POST Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hi yatesco ,

    you mean we can do "Redirect-after-Post" with those "POST parameters" included in spring now ? ai ....when they added the feature ?

    what l mean is (from the link l given above) ,

    Redirect-after-Post is the name given to a fairly simple technique. The idea is that after a form POST has occurred and the server has done something significant (create a user, place a trade etc.) that it is safest to then redirect the user to another (or perhaps the same) page. By redirecting we ensure that if the user hits the refresh button they don't re-submit the form. If we were to have simply forwarded to a page after the POST, a refresh would re-post the form!

    But there is a down side to redirecting. Anything stored in request attributes is lost when the redirect is issued (because the request for the page is not the same request). One option is to stuff things into session, but that's a bad idea(tm) because it things will break when the user has more than one browser window open using your application.


    • #17
      Anything in the ModelAndView will be appended to the redirect URL.

      In the user use case above, it is likely that the /users/created.htm requires the userId, so the ModelAndView used to issue the redirect should include it.


      • #18
        Oh ....there is a misunderstanding here , may be is my bad .

        yes , spring can support that .

        but what l want is the POST parameters NOT SHOW in the url after a redirect , that mean redirect AGAIN using POST method to send the previous POST parameter ..

        sorry for being unclear.



        • #19
          Oh I see.

          Not sure then.

          (you were clear; I was just loosing track of the thread )
          Last edited by Colin Yates; Apr 13th, 2006, 08:43 AM.